当前位置:编程学习 > php >>

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... <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]." ";
}
?>
</pre>
<?
flush();
sleep(3);
}
?>

补充:Web开发 , php ,
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,