
Originally Posted by
navaldesign
You need to read the page code and then replace the original words.
Usually you work like this:
<?
$url = "
http://www.yourdomain.com/originalpage.html"; // The original page
$string = file_get_contents($url);
$pattern = " kewl ";
$replacement = " fool ";
$string = str_replace($pattern, $replacement, $string);
// At this point ALL occurences of the word "kewl" are replaced
echo $string; // This will output the new page to the browser.
?>
I tried to replace " Link#1 " with " Play " and saved it in a php file but it is not working.any help? (you can find Link#1 by clicking on a game )
<?
$url = "http://www.livescorehunter.com/Live-Streaming-Video/P2P-Links/"; // The original page
$string = file_get_contents($url);
$pattern = " Link#1 ";
$replacement = " Play ";
$string = str_replace($pattern, $replacement, $string);
// At this point ALL occurences of the word "kewl" are replaced
echo $string; // This will output the new page to the browser.
?>