Results 1 to 2 of 2

Thread: Parse a webpage

  1. #1
    Join Date
    Sep 2006
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Arrow Parse a webpage

    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

  2. #2
    Join Date
    Aug 2006
    Posts
    239
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    $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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •