|
楼主 |
发表于 2003-7-31 22:45:52
|
显示全部楼层
好了,我自己把完整的代码写出来了。
<html>
<title>
Gateway status
</title>
<body>
<?php
$status_all=`arp -i eth0|grep -v Add|grep -v Mail|awk '{print $1}'|wc|awk '{print $1}'`;
$status_all=$status_all-2;
echo "all online clients: $status_all"."<p>";
$status_allip=`arp -i eth0|grep -v Add|grep -v Mail|awk '{print $1}' > /www/allip.inf`;
echo "<br><table>";
//Open file
$fz=fopen("./allip.inf","r");
while (!feof($fz))
{
$buffer=fgets($fz,100);
echo "<tr><td>$buffer</td></tr>";
}
fclose ($fz);
echo "</table>";
?>
</body>
</html> |
|