match string in html file

Discussion in 'PHP' started by playwright, Jun 4, 2010.

  1. #1
    Is there a way to search in html file for a specific string and the same string plus some other content? For example:
    abc.php?t=123 and also abc.php?t=123&page=2 and abc.php?t=123&page=3. Is there a regex that can do the job along with preg_match()?
     
    playwright, Jun 4, 2010 IP
  2. Zerix

    Zerix Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Not sure if you can load a URL with get variables using file_get_contents, but give that a quick read through: http://php.net/manual/en/function.file-get-contents.php

    Is really simple to use. If it doesn't work have a look at cURL. That allows you to load in POST and GET variables :)
     
    Zerix, Jun 4, 2010 IP
  3. viron86

    viron86 Active Member

    Messages:
    426
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60