php实现ping
时间:2007-02-17 来源:PHP爱好者
<?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)
php爱好者站 http://www.phpfans.net dreamweaver|flash|fireworks|photoshop.
// 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)
php爱好者站 http://www.phpfans.net dreamweaver|flash|fireworks|photoshop.
相关阅读 更多 +