PHP Coding question

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am trying to check to external web pages for values on the sites. I
am totally new to php and i am using the strip tags to check if the
value is there and that works for the one site but on the other site i
need to check if a gif file is present. Can anyone help?

Re: PHP Coding question

You may be able to use a simple regular expression. For example:

    $html = file_get_contents(' ') or

    if (preg_match('/\bimage.gif\b/', $html)) {
      // Found image.gif

For a stricter match you could use a pattern like:


You can do more with regular expressions, or you could parse the HTML
with the PEAR module XML_HTMLSax3: wrote:
Quoted text here. Click to load it

Site Timeline