Purpose:Grab IP adresses using PHP logging
Difficulty: Easy
Assumed Knowledge: Copy & Paste/FTP Clients
Okay, let me give you the low down on what this is...
This is a way to get someone's IP adress using a simple PHP logging script. What you are doing is adding 2 files(one ".php" and one ".txt". When you victim visit's the website, their IP will be logged in the ".txt" file. Pretty simple I guess, let's get started.
Ok, to start off make a new file called Index.php . And inside that PHP file add this code:.
Code
<?php
header( 'Location: YOURIMAGEURLHERE' ) ;
$ip=$_SERVER['REMOTE_ADDR'];
$myFile = "ip.txt";
$fh = fopen($myFile, 'a') or die("cannot open file");
$stringData = "$ip\n";
fwrite($fh, $stringData);
fclose($fh);
?>Now replace "YOURIMAGEURLHERE" with an image you want the page to display. Once changed, save and close the file.
Now make an other file called ip.txt . Leave it empty, because it will be filled out automatically when someone visit's your web site.
Ok, so now you should 2 files. One should be Index.php and and other should be IP.txt.
[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/1-6.png[/IMG]
Your next step is to upload them to your website.
Make a new directory, it doesn't matter what it is called. Drag and drop the 2 files into that directory.
[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/2-5.png[/IMG]
Now to get your victim to click the link, your going to go with the picture method.
Go to Dot TK - Renaming The Internet . And type in the url of your website, including the directory the 2 files are in. It should look something like this:
[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/3-4.png[/IMG]
Once you click NEXT, you should be prompted for you to choose your domain name. Try to choose something more believable. Try to make them think it's a image hosting company.
[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/4-3.png[/IMG]
So now that you have you .TK url that redirects to your website, your ready to give out your grabber. I'm going to go more in detail on how it will work. And I'm going to give you a little tip.
Most people do not know, but with a .TK link, you can addon to the end of the url, and it will not affect anything. This helps when spoofing a url! Let me give you an example.
[IMG]http://i1084.photobucket.com/albums/j407/runefx-virux/5-3.png[/IMG]
Code
*http://imagedumperzzzz.tk*IS EQUAL TO
Code
*http://imagedumperzzzz.tk/images/image22242.png*See what I mean?
Ok, so now your about to send the link to your friend... What do you do once he clicks it? Go back to the ip.txt file I told you to make earlier. The victim's ip should be the one at the bottom. :)
You should go back to the ftp client, and right click the IP.txt file. Click "view/edit", and your victims IP should be right their at the bottom.
[IMG]http://i56.[censored].com/2mw9k40.png[/IMG]
It should look like that, I blocked some numbers to protect the tester's IP.
So have fun grabbing some IP's. What you do with them is not my problem nor my responsiblity.
So here are some Web Hosting company's and domain hosting company's
Free Web Hosting - PHP, MySQL, FTP, Email [That is an okay web hosting company]
CO.CC - Free Domain name registration + Free DNS service. [That is an okay domain hosting company]
Their may be better, you may do some research yourself.



![[Image: iHcRBZd.gif]](https://i.imgur.com/iHcRBZd.gif)