Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- * GETTING AN IP THROUGH A IMAGE USING PHP *
- 1. Create a .php file with the following code:
- <?php
- header('Content-type: image/jpeg');
- readfile('gah.jpg');
- $filename = "logfile.txt";
- $logstring = "Connection from:".$_SERVER['REMOTE_ADDR']." at ".date("r",time())."\n";
- if ($handle = fopen($filename, 'a')) {
- fwrite($handle, $logstring);
- fclose($handle);
- }
- ?>
- 2. Add a text file named "logfile.txt"
- 3. Add a image of your choice and name it "gah.jpg"
- 4. Now visit the php and watch your IP get transfered to logfile.txt
Advertisement
Add Comment
Please, Sign In to add comment