View Full Version : file_get_contents

03-29-2007, 11:28 AM

Im trying to read a html page and get php to alert me with a image symbol if i find the text "red" or "warning" or "green" on the html page.

How can i search when using file_get_contents http ?

$content = file_get_contents('http://intranet:85/bb/bb.html');
if ($content !== false)
$find = look for red
if $find = red view image red.gif
$find = look for warning
if $find = warning view image warning.gif
$find = look for green
if $find = green view image green.gif




03-29-2007, 04:20 PM
Look into strpos() (http://us3.php.net/manual/en/function.strpos.php).

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum