Hi,
I would like to ping a ip address (preferably that of the person visiting the website) a certain number of times, and then display the result of the ping for their viewing. Can anybody suggest a piece of code to do this. I do currently have a bit of a PHP script, which is below.
<?
$ip = getenv("REMOTE_ADDR");
$command = "ping -c$nop $ip";
exec($command, $result, $rval);
for ($i = 0; $i < sizeof($result); $i++) {
echo "$nop $result[$i]<br>";
}
?>