get data from file

From: Date: Wed, 05 Dec 2001 23:59:14 +0000
Subject: get data from file
Groups: php.general 
Request: Send a blank email to php-general+get-77249@lists.php.net to get a copy of this message
I need to get data from a web page generated by mrtg in my page.... i have come up with the following code <?php $file = "/virt/usaexpress/www/noc/mrtg/216.107.214.1_4.html";
    $string = implode("\n", file($file));
    $string1 = explode("<META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\">", $string);
$string2 = explode("</HEAD>", $string1[1]); $stat = eregi("<!--(.*)-->",$string2[0]); echo $stat; //while (list ($key, $val) = each ($string3)) {
    //echo "$key => $val<br>";
//} ?> however - I get a "1" when look on the php site - under manual... any ideas? ~kurth

« previous php.general (#77249) next »