From Guest, 3 Years ago, written in PHP.
This paste is a reply to Simple IP Logger PHP from Sagar - view diff
Embed
  1. <?php
  2. // Do make a visitors.html file and set permission to 0777
  3.  
  4. $ip = $_SERVER['REMOTE_ADDR'];
  5. $browser = $_SERVER['HTTP_USER_AGENT'];
  6. $dateTime = date('Y/m/d G:i:s');
  7. $file = "visitors.html";
  8. $file = fopen($file, "a");
  9. $data = "<pre><b>User IP</b>: $ip <b> Browser</b>: $browser <br>on Time : $dateTime <br></pre>";
  10. fwrite($file, $data);
  11. fclose($file);
  12. echo "<h1>Hi n0.0b :)</h1>";
  13. ?>