当前位置: 移动技术网 > IT编程>开发语言>PHP > php实现ping

php实现ping

2019年06月10日  | 移动技术网IT编程  | 我要评论

<?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)

如对本文有疑问, 点击进行留言回复!!

相关文章:

验证码:
移动技术网