I set up the downloader, very nice and easy script. Thanks again zub.
However when someone downloads my file it is stored in the logs without a new line. It looks like this...
downloads.log12.18.2008 12:14am IP.ADDR FILE.ZIP12.18.2008 12.18.2008 12:14am IP.ADDR FILE.ZIP12.18.2008 12:14am IP.ADDR FILE.ZIP
But with no new line whatsoever just a single line all jumbled together.
The log code is as such:
// log downloads
if (!LOG_DOWNLOADS) die();
$f = @fopen(LOG_FILE, 'a+');
if ($f) {
@fputs($f, date("m.d.Y g:ia")." ".$_SERVER['REMOTE_ADDR']." ".$fname."\n");
@fclose($f);
}
I know it has to do with the \n but I have no PHP knowledge so if anyone could make it log to a new line each time or is it just me?
Thanks again!