php实现ping
php实现ping
发布时间:2016-12-29 来源:查字典编辑
摘要:(出处:Viphot)

<?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教程学习
编程开发子分类