Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IP Logger
#1
This script when put on a website will write the ips of all visitors and write to log.html, it will create a link to an ip database website. Make sure you have created log.html and that you have set the permisions so it can be writen.

Code:
<?php
      $logfile= 'log.html';

      $IP = $_SERVER['REMOTE_ADDR'];

      $logdetails=  date("F j, Y, g:i a") . ': ' . '<a href=http://dnsstuff.com/tools/city.ch?ip='.$_SERVER['REMOTE_ADDR'].'>'.$_SERVER['REMOTE_ADDR'].'</a>';
  
      $fp = fopen($logfile, "a");

      fwrite($fp, $logdetails);
  
      fwrite($fp, "<br>");
  
      fclose($fp);

      ?>
Reply
#2
That's hot, I saved this. Big Grin
Reply
#3
Thanks for this tut ive always wondered how to get a persons ip in php i kew how to save it but not how to retrive it thanks agian!
Reply
#4
no problem
Reply
#5
I'll eventually post one of these for python soon.
Reply
#6
Nice post
Reply
#7
Thanks for this.
Reply
#8
Thanx...for this u must get a +rep
[Image: 2d75599e9a.png]:superman:
Reply
#9
thanks all Big Grin
hey, if you like my post then please give me +rep, it only takes two seconds but it will be greatly appreciated thanks!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  My ip logger with email and html logging option ELY_M 7 3,048 12-13-2010, 10:41 PM
Last Post: Bursihido
  1x1 pixel IP Logger Nyx- 22 5,240 04-16-2010, 03:27 AM
Last Post: .:xX[ThunderStorm]Xx:.
  Complete User Logger h1r0n 11 2,659 10-14-2009, 03:02 AM
Last Post: h1r0n

Forum Jump:


Users browsing this thread: 1 Guest(s)