Jan 22

php实现ping 不指定

bkkkd , 14:05 , 开发应用 , 评论(0) , 引用(0) , 阅读(3479) , Via 本站原创 | |

<?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);
}
?>
发表评论
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
记住我
昵称   密码   游客无需密码
网址   电邮   [注册]