Home  >  Article  >  php教程  >  php实现ping (转)

php实现ping (转)

WBOY
WBOYOriginal
2016-06-21 09:12:471246browse

    //  created by joe lumbroso
    //  see some other good php3 scripts
    //  goto http://www.dtheatre.com/scripts

echo "Pinging
";
$to_ping = "dtheatre.com";
$count = 3;
$psize = 65;
echo "   Please be patient, this can take a few moments...\n

";
flush();

while (1) {
?>
<br> <br>exec("ping -c $count -s $psize $to_ping", $list);<br>for ($i=0;$i    print $list[$i]."\n";<br>}<br>?><br>


flush();
sleep(3);
}
?>



Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn