php实现ping
类别: PHP教程
<?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);
}
?>
- 上一篇: 一个非常精彩的日历程序
- 下一篇: PHP语句中or的用法
-= 资 源 教 程 =-
文 章 搜 索