<?php
$NOW = time();
if(@file_exists("/data/new/debug/".date("Y.m.d",$NOW).".txt")) {
$fd = fopen("/data/new/debug/".date("Y.m.d",$NOW).".txt","r");
$buffer = "";
while (!feof ($fd)) {
$buffer = fgets($fd, 4096);
if($buffer <> "") {
$LOGS[] = $buffer;
}
}
unset($buffer);
fclose ($fd);
OOPSHTTPSend("<table width=100% cellspacing=1 cellpadding=5 border=0 bgcolor=".$OOPSGlobal["BASE_COLOR_2"].">");
reset($LOGS);
while(list($n,$v) = each($LOGS)) {
$LOG = explode("\t",$v);
$TIME = $LOG[0];
$IP = $LOG[1];
$REF = $LOG[2];
$SES = $LOG[3];
$WHO = $LOG[4];
$CNT = $LOG[5];
$PAG = $LOG[6];
$DATA = $LOG[7];
if($PAG == "SEARCH") {
$STR = substr($DATA,4);
if(!empty($STR)) {
if(empty($QSQ[$STR]))
$QSQ[$STR] = 1;
else
$QSQ[$STR]++;
}
}
}
asort($QSQ);
$QSQ = array_reverse($QSQ,true);
reset($QSQ);
while(list($r,$c) = each($QSQ)) {
...
}
unset($LOGS);
}
?>