当前位置: 首页 > 图文教程 > 网络编程 > PHP > php实现ping
//createdbyjoelumbroso
//seesomeothergoodphp3scripts
//gotohttp://www.dtheatre.com/scripts
echo"<fontcolor=\"red\"><blink><b>Pinging</b></blink></font><br>";
$to_ping="dtheatre.com";
$count=3;
$psize=65;
echo"Pleasebepatient,thiscantakeafewmoments...\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);
}
?>
评论 (0) All