php实现ping功能
PHP #ping2012-10-28 22:52
以下是相关实现代码:
<?php
// http://yige.org/php/
echo "<font color="red"><blink><b>Pinging</b></blink></font><br>";
$to_ping = "yige.org";
$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);
}
?>相关文章
- PHP自定义json_encode函数 2012/10/26
- PHP过滤HTML标签的函数 2012/10/26
- PHP实现discuz安装进度显示 2012/10/23
- PHP分页类 2012/10/23
- php关联数组快速排序 2012/10/21
- php获取数组中重复数据的函数 2012/10/20
- PHP+MYSQL身份验证的方法 2012/10/20
- PHP找不到php_curl.dll的解决方法 2012/10/20
- PHP注入:谈MySql的SQL注入 2012/10/12
- php注入基本步骤 2012/10/11