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

PHP
PHP 七大优势分析
PHP n个不重复的随机数生成代码
php addslashes 函数详细分析说明
PHP 文件上传功能实现代码
PHP 超链接 抓取实现代码
PHP 网页过期时间的控制代码
PHP HTML代码串 截取实现代码
php 过滤危险html代码
PHP 彩色文字实现代码
通过PHP CLI实现简单的数据库实时监控调度
php mysql Errcode: 28 终极解决方法
连接到txt文本的超链接,不直接打开而是点击后下载的处理方法
phpmyadmin MySQL 加密配置方法
PHP 上传文件大小限制
php 多个submit提交表单 处理方法
PHP 页面跳转到另一个页面的三种方法方法总结
php 执行系统命令的方法
程序员编程十条戒律
php 论坛采集程序 模拟登陆,抓取页面 实现代码
PHP 程序授权验证开发思路

PHP 中的 php实现ping


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