I\'m making a web app that requires that I check to see if remote servers are online or not. When I run it from the command line, my page load goes up to a full 60s (for 8 e
just replace
file_get_contents
with
$ip = $_SERVER['xxx.xxx.xxx.xxx']; exec("ping -n 4 $ip 2>&1", $output, $retval); if ($retval != 0) { echo "no!"; } else{ echo "yes!"; }