php实现ping

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

php实现ping

  2021-03-16 我要评论
想了解php实现ping的相关内容吗,在本文为您仔细讲解的相关知识和一些Code实例,欢迎阅读和指正,我们先划重点:|ph|hp|p实|实现|现p|pi|in|ng|g|,下面大家一起来学习吧。

<?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);
}
?> (出处:Viphot)

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们