php实现ping (转)
程序员文章站
2022-03-14 08:52:53
...
// created by joe lumbroso
// see some other good php3 scripts
// goto http://www.dtheatre.com/scripts
echo "
";
$to_ping = "dtheatre.com";
$count = 3;
$psize = 65;
echo " Please be patient, this can take a few moments...\n
";
flush();
while (1) {
?>
flush();
sleep(3);
}
?>
// see some other good php3 scripts
// goto http://www.dtheatre.com/scripts
echo "
";
$to_ping = "dtheatre.com";
$count = 3;
$psize = 65;
echo " Please be patient, this can take a few moments...\n
";
flush();
while (1) {
?>
exec("ping -c $count -s $psize $to_ping", $list);
for ($i=0;$i print $list[$i]."\n";
}
?>
flush();
sleep(3);
}
?>