php实现ping
时间:2021-03-27 09:31:31|栏目:PHP代码|点击: 次
<?php // created by joe lumbroso
// see some other good php3 scripts
// goto http://www.dtheatre.com/scripts echo "<font color=\"red\"><blink><b>Pinging</b></blink></font><br>";
$to_ping = "dtheatre.com";
$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)
上一篇:通过文字传递创建的图形按钮
栏 目:PHP代码
下一篇:PHP逐行输出(ob_flush与flush的组合)
本文标题:php实现ping
本文地址:http://www.codeinn.net/misctech/89232.html






