龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > php编程 >

php实现ping

时间:2012-12-24 21:59来源:未知 作者:admin 点击:
分享到:
<?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... <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]." ";
}
?>
</pre>
<?
flush();
sleep(3);
}
?>



精彩图集

赞助商链接