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

PHP
include()与require()的对比
php和asp对象的等价关系
PHP, JScript 和 VBScript 函数和类的语法
PHP:MVC迷思
PHP脚本的8个技巧(1)
PHP脚本的8个技巧(2)
PHP脚本的8个技巧(3)
PHP脚本的8个技巧(4)
PHP脚本的8个技巧(5)
PHP脚本的8个技巧(6)
PHP脚本的8个技巧(7)
PHP脚本的8个技巧(8)
PHP教程.经验技巧(上)
递归列出所有文件和目录
PHP的历史和优缺点
PHP下MAIL的另一解决方案
PHP文本数据库的搜索方法
PHP调用三种数据库的方法(1)
PHP调用三种数据库的方法(2)
PHP调用三种数据库的方法(3)

PHP 中的 php实现ping


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-08-14   浏览: 53 ::
收藏到网摘: 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);
}
?>