string contains a substring - PHP: "How does one tell if a string contains a certain substring?
For example:
$a = popen('/bin/ping -c1 $rhost', 'r');
$read = fread($a, 1024);
pclose($a);
if($read contains '1 received')
{
print 'Ping Succeded';
}
else
{
print 'Ping Failed';
}"
No comments:
Post a Comment