Log in

View Full Version : Parse a webpage



mauritsgrootveld
10-24-2006, 09:09 AM
Hi,

How could I parse a webpage so that i can replace a specific piece of code (ad tag) with my own code, and then display this modified page?

Greetz

ItsMeOnly
10-24-2006, 09:30 PM
$content = file_get_contents("mypage.html");
$content = str_replace("a", "b", $content);

However, what do you want to achieve actually? maybe you'd try SSI if you want to add heders and footers.