首页 > 开发 > PHP > 正文

php实现ping (转)

2024-05-04 22:55:28
字体:
来源:转载
供稿:网友
<?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);
}
?>
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表