![]() |
|
How to ping an IP with PHP - Printable Version +- Sinisterly (https://sinister.li) +-- Forum: Coding (https://sinister.li/Forum-Coding) +--- Forum: PHP (https://sinister.li/Forum-PHP) +--- Thread: How to ping an IP with PHP (/Thread-How-to-ping-an-IP-with-PHP) Pages:
1
2
|
RE: How to ping an IP with PHP - Meowie - 10-18-2015 PHP Code: function ping($host,$port=80,$timeout=6)
{
$fsock = fsockopen($host, $port, $errno, $errstr, $timeout);
if ( ! $fsock )
{
return FALSE;
}
else
{
return TRUE;
}
}
Way better and no RCE shit, unlike all but one posts above. RE: How to ping an IP with PHP - Dastil - 11-30-2015 Nice! Didn't know you could do that in PHP! |