Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ip Grabber or logger in PHP
11-25-2009, 05:03 AM
Post: #1
Ip Grabber or logger in PHP
This is very simple IP grabber written in PHP.
You just need to specify name of log file and put this as a code in your page.
Also you can save this as PHP file and use iframe for running it from a page.
When you make "log.txt" don't forget to chmod it to 777.
So here is the code :
Code:
<html>
<?php
$file = "log.txt";
$f=fopen($file, 'a');
fwrite($f,$_SERVER['REMOTE_ADDR']."\n");  
fclose($f);
?>
<p>File not found</p>
</body>
</html>

"I dont know with what weapons World War 3 will be fought with, but i know World War 4 will be fought with stones and sticks" - Albert Einstein
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


 Quick Theme: