当前位置: 首页 > 图文教程 > 网络编程 > PHP > php实现ping

PHP
PHP学习宝典-第四章
PHP学习宝典-第五章
PHP学习宝典-第六章
PHP学习宝典-第六章(续篇)
PHP学习宝典-第七章
PHP学习宝典-第八章(一)
PHP学习宝典-第八章(二)
PHP学习宝典-第九章
php配置,链接access数据库
HTML 初学者指南(一)
HTML 初学者指南(二)
HTML 初学者指南(三)
HTML 初学者指南(四)
HTML 初学者指南(五)
HTML 初学者指南(六)
HTML 初学者指南(七)
HTML 初学者指南(八)
HTML 初学者指南(九)
HTML 初学者指南(十)
网页常用特效整理:初级篇

PHP 中的 php实现ping


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-14   浏览: 85 ::
收藏到网摘: n/a

<?php

//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);
}
?>