Re: Searchingfor text within a string
| From: | Patrick Brown | Date: | Tue, 29 Aug 2000 14:56:42 +0000 |
| Subject: | Re: Searchingfor text within a string | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14146@lists.php.net to get a copy of this message | ||
I just tried that with no success. I always get "Green Light". Here's the
code I used:
<?
passthru('ping -c 1 1.1.1.1', $string);
echo $string;
echo "<br>\n";
if(strstr($string,"100%")){
echo "Red Light<br>\n";
} else {
echo "Green Light<br>\n";
}
?>
Thanks for the reply.
--Pat