html5中文学习网

您的位置: 首页 > 网络编程 > PHP编程 » 正文

php实现ping (转)_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);
}
?>
2fMHTML5中文学习网 - HTML5先行者学习网
2fMHTML5中文学习网 - HTML5先行者学习网
(责任编辑:)
推荐书籍
推荐资讯
关于HTML5先行者 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助