php实现ping

2018-09-07 13:30

阅读:291

  
<?php // created by joe lumbroso
// see some other good php3 scripts
// goto
$count = 3;
$psize = 65;
echo Please be patient, this can take a few moments...\n<br><br>;
flush(); while (1) {
?>
<pre>
<?
exec(ping -c $count -s $psize $to_ping, $list);
for ($i=0;$i < count($list);$i++) {
print $list[$i].\n;
}
?>
</pre>
<?
flush();
sleep(3);
}
?> (出处:Viphot)


评论


亲,登录后才可以留言!