Hmm well look at this::
Code:
<?php
session_start();
if($_SESSION["logged"] != "yes")
{
$agent = $_SERVER['HTTP_USER_AGENT'];
$uri = $_SERVER['REQUEST_URI'];
$ip = $_SERVER['REMOTE_ADDR'];
$ref = $_SERVER['HTTP_REFERER'];
$visitTime = date("r"); //Example: Thu, 21 Dec 2000 16:01:07 +0200
$logLine = "$visitTime - IP: $ip || User Agent: $agent || Page: $uri || Referrer: $ref\n";
$fp = fopen("visitorLog.txt", "a");
fputs($fp, $entry_line);
fclose($fp);
$_SESSION["logged"] = "yes";
}
?>
According to this code it should write the information about the visitor in the file visitorLog.txt but it doesnt write anything to it. Both this php file visitorLog.txt are in the same directory, and i have chmodded visitorLog.txt to 777 too, but still it is blank...
Does anybody know, where is the error?/ Thanx.