How to – Get User IP via Image

Hello visitors, I know this trick is known already but I’m gonna share this because someone don’t know this also so I’m gonna give them a tutorials about this. This tutorials explains how to get the IP of an user using an External Image.

Here’s the step :
1. You need to have an account in a Webhosting Site first. 
2. Go to File Manager and create a new directory. If you are using a FTP Client, just right click and click Create New Directory. ( I’ll use “ip” ) 
 My Directory is :
3. Create a file and name it ” .htaccess ” then edit the file and copy this code ;

RewriteEngine on
RewriteRule ^image.gif$ iplogger.php

4. Create two files, namely “image.gif” & “iplogger.php” ( Note : You can name anything you want in the image )

image.gif – will be used as external image, upload it to the directory you created.
iplogger.php – paste the code below ;


$log = ‘logger.html’;
$page = $_SERVER[‘REQUEST_URI’];
$refer = $_SERVER[‘HTTP_REFERER’];
$date_time = date(“l j F Y  g:ia”, time() – date(“Z”)) ;
$fp = fopen(“logger.html”, “a”);
fputs($fp, ”
IP: $ip
Page: $page
Refer: $refer


flock($fp, 3);

 5. Create a new file namely “logger.html” . This is the file where the Logged IP is saved, you can change this to your own will to make it hard to breach.
6. Go to forum or anywhere to post your image. 
If you want to use this code in your own site, use this code :

<img src=””&gt;

If you want to use this in a forum, use bbcode :

[img] [/img]

That’s it, you’re done. You can modify it into you own if you know how to do it.

Published by Grey Uzuo

Simple cyber surfer sharing random things with credits.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

<span>%d</span> bloggers like this: