'
.'IP: '.getenv('REMOTE_ADDR'). "
\n"
.' DT: '.date("M jS, Y - g:i a"). "
\n"
.' PG: '.getenv('REQUEST_URI'). "
\n\n";
if(@$handle = fopen($file, 'r')){
$data = @fread($handle, filesize($file));
fclose($handle);
}
while(strlen($data) > $maxlen){
$temp = explode("\n\n", $data);
unset($temp[count($temp)-1]);
$data = implode("\n\n", $temp);
}
if(@$handle = fopen($file, 'w')){
fwrite($handle, $input.$data);
fclose($handle);
unset($file, $maxlen, $input, $data, $temp, $handle);
}
?>