I have a custom log file which uses fopen, fwrite, and fclose. Example :
[php]
// Log IP Address Of All Visitors
$filename = $_SERVER[‘DOCUMENT_ROOT’] ."/Logs/visitors_IP.txt";
$referred = $_SERVER[‘HTTP_REFERER’];
if ($referred == “”) {
$referred = “Direct Request”;
}
$handle = fopen($filename, “a”);
$content = “[ " . date( ‘M d, Y, g:i a’ ) . " ]” . " Visitor_IP = ( " . $_SERVER[‘REMOTE_ADDR’] . " )" . “\n” . “Linked from = ( " . $referred . " )”;
fwrite($handle, $content . “\n”);
fclose($handle);
[/php]
I’m getting a notice when it’s a direct request :
Notice: Undefined index: HTTP_REFERER
This puts IE in quirks mode as the notice gets printed above the html !doctype. Thanks in advance for any help on this.