note 86221 deleted from function.exec by danbrown
| Newsgroups | php.notes |
|---|---|
| Message-ID | <[email protected]> |
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