Hey all
i have a small login script, that logs ip and username of the people that login.
The problem is the logfile gets pretty big cause every time they refresh, it logs all of the text again.
So i was wondering if i could do so it would only update the text if the IP had changed, or something like that, so the file wouldent get that big.
$ip = $_SERVER['REMOTE_ADDR'];
$day=time();
$day=date("h:i:s A M d",$day);
$logname = $_SESSION['username'];
$file = fopen("userlog.txt","a+");
fwrite($file, "Username: " . $logname . ", Date: " . $day . ", IP: " . $ip ."\r\n");
fclose($file);
I hope you understand this, and are able to help
Thanks
Maller