View previous topic :: View next topic |
Author |
Message |
razorsedge -
Joined: 06 Jan 2007 Posts: 104
|
Posted: Fri Feb 02, 2007 7:03 pm Post subject: Finding out IP info |
|
|
K i want to write a script to where when someone that i told 2 enter a site, it would give me their ip address... then it would send to a log file... i have searched hotscripts and kirupa and i found nothing. i dont kno what the title would be... but.. i wantit 2 be a php script... the reason i am doing this is because one of my friends is getting "verbally assualted" online and we are going to report this person. is there a way to do what i want? |
|
Back to top |
|
|
cmxflash -
Joined: 11 Dec 2004 Posts: 872
|
Posted: Fri Feb 02, 2007 7:10 pm Post subject: |
|
|
This little script will save the IP from the visitor into ip.txt.
Code: | <?php
//Start by getting the IP
$ip = $_SERVER['REMOTE_ADDR'];
//Open ip.txt
$handle = fopen("ip.txt", "w");
//Write the IP
fwrite($handle, $ip);
//Close the file
fclose($handle);
//Should probably be changed
echo "Gotcha! Your IP is saved.";
?> |
An easier way would just be to check your Abyss log file for the specific URL you'll send to him. |
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Feb 02, 2007 7:38 pm Post subject: |
|
|
You should note that method does not always work for getting the IP. It will detect any ISP transparent proxies if the user operates behind one. This means the ip logged will be incorrect and cant be used to identify the user. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
|