您的位置
主页 > 网站技术 > 语言编程 > » 正文

php实现ping

来源: 站长圈 点击:

<?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); 
?> 
详细出处参考:http://www.jb51.net/article/1522.htm



首页  - 关于站长圈  - 广告服务  - 联系我们  - 关于站长圈  - 网站地图  - 版权声明