this one should work, but dosen't. ;-(
function ping($host) {
$ip=gethostbyname($host);
$result=ping -c 1 $ip;
$a=strpos($result, "time=");
$b=strpos($result, " ms");
if (!$a || !$b) {
return FALSE;
}
$a=$a+5;
$r=substr($result, $a, $b-$a);
return $r;
}
dosen't work on my windows-maschine.
there is no data in $result.
i tried many other ways but none worked.
is there an option to turn on in php?
or dosen't it work on windows?
tnx Wolf
ps: excuse my BAD english. i'm german.