Time |
IP Address |
Host |
connect()) {
$result = $visits->query("select * from $COUNT_TBL[visitors] order by time desc");
while ($row = $visits->fetch_array($result)) {
$time_format = strftime("%H:%M",$row['time']);
echo " \n";
echo " $time_format | \n";
echo " $row[ip] | \n";
echo " $row[host] | \n
\n";
}
$visits->close_db();
}
} else {
if(file_exists($COUNT_CFG['logfile'])) {
$ip_array = file($COUNT_CFG['logfile']);
for ($i=sizeof($ip_array)-1;$i>=0;$i--) {
list($time_stamp,$ip_addr,$hostname) = split("\|",$ip_array[$i]);
$host = chop($hostname);
$time_format = strftime("%H:%M",$time_stamp);
echo " \n";
echo " $time_format | \n";
echo " $ip_addr | \n";
echo " $host | \n
\n";
}
}
}
?>
Daily Counter 1.1 |