daily pastebin goal
0%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. $file = 'fileman_access.log';
  4. $ip = isset($_SERVER['HTTP_CLIENT_IP'])?$_SERVER['HTTP_CLIENT_IP']:isset($_SERVER['HTTP_X_FORWARDED_FOR'])?$_SERVER['HTTP_X_FORWARDED_FOR']:$_SERVER['REMOTE_ADDR'];
  5. $date = new DateTime();
  6. $dateString = '[ '.$date->format('Y-m-d H:i:s').' ]';
  7. $url = $_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF'];;
  8. $path = getcwd();
  9.  
  10. $string = $dateString."\t".$ip."\t".$path."\t".$url."\n";
  11.  
  12. file_put_contents($file, $string, FILE_APPEND | LOCK_EX);
  13.  
  14. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top