Zubrag.com
September 25, 2018, 11:36:33 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: logfile adaptation  (Read 4398 times)
***elvis***
Newbie
*
Posts: 2


« on: February 28, 2012, 12:30:44 AM »

Fantastic script works great.

The file on the server gets to me a cryptic names like "aPp201200Zc345a.zip" and the call will be downloaded the correct file name is spelled "Donloadfile.zip".

The logfile is now only the cryptic names (aPp201200Zc345a.zip). How do I get in addition to the correct file name specified in the log file?

Can you help me?

Translated with google, original German


EDIT:
------

To increase security, it would be better the cryptic file names not to write to the logfile, only the right one.

I specify it the question.

How do I get in the log file the new file name is displayed and not the filename of the file on the server?

Logged
***elvis***
Newbie
*
Posts: 2


« Reply #1 on: February 28, 2012, 01:46:34 AM »

I have a solution:

Code:
$f = @fopen(LOG_FILE, 'a+'); 
if ($f) { 
  @fputs($f,date("d/m/Y H:i")."  IP: ".$_SERVER['REMOTE_ADDR']."  Downloadfile: "
     .( $asfname === 'NoName' ? $fname : $asfname )."\n"); 
  @fclose($f); 
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC