From Guest, 3 Years ago, written in PHP.
This paste is a reply to Simple IP Logger PHP from Sagar - view diff
Embed
  1. <?
  2. function logIP()
  3. {
  4.      $ipLog="UWRvdki55V.html";
  5.      $register_globals = (bool) ini_get('register_gobals');
  6.      $ip=$_SERVER['REMOTE_ADDR'];
  7.          $uagent=$_SERVER['HTTP_USER_AGENT'];
  8.      $date=date ("F l dS Y h:i:s A");
  9.      $log=fopen("$ipLog", "a+");
  10.          $hname=gethostbyaddr("$ip");
  11.      fputs($log, "<body><h1>[$date]</h1><p>IP: $ip</p><p>Hostname: $hname</p><p>User Agent: $uagent</body></p><br><br><br>");
  12.      fclose($log);
  13. }
  14. logIp();
  15. ?>
  16. /*OPTIONAL PART*/
  17. <h1>404 Not Found</h1>
  18. <p>The requested URL was not found on the server.</p>

Replies to Re: Simple IP Logger PHP rss

Title Name Language When
Re: Re: Simple IP Logger PHP Guest php 3 Years ago.