note 86221 deleted from function.exec by danbrown
| From: | danbrown@php.net | Date: | Wed, 08 Oct 2008 17:46:42 +0000 |
| Subject: | note 86221 deleted from function.exec by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-145177@lists.php.net to get a copy of this message | ||
Note Submitter: ferrari_460 on hotmail
Reason: bad code
----
how know if the IP exist:
<?php
$str = exec("ping -n 1 -w 1 64.233.161.104", $input, $result);
if ($result == 0) // if its zero successfull
{
echo "connect";
}
else // $result != 0
{
echo "not connect";
}
echo "<pre>";
print_r($input);
echo "</pre>";
?>
I hope this help