Get Visitor IP and save to txt file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Basic
Forum Newbie
Posts: 5
Joined: Fri Nov 13, 2009 3:32 am

Get Visitor IP and save to txt file

Post by Basic »

Hi.

My friend just got his steam+email and all <span style='color:blue' title='I&#39;m naughty, are you naughty?'>smurf</span> hacked. How, we don't know.
We need his IP, so I need someone to help me get his IP.

I need a script that gets the visitor IP (His) and saves it to a .txt file?
Can anyone help me with that?
More information gathering would be nice thanks.

Please help if you can! :(
eFishy
Forum Newbie
Posts: 9
Joined: Tue Jan 05, 2010 12:26 pm

Re: Get Visitor IP and save to txt file

Post by eFishy »

If you just want your mates IP go to a website like ipchicken.com
If you want to get the IP of a visitor, this should do the trick

Code: Select all

 
$VisitorIP = $_SERVER['REMOTE_ADDR'];   
 
Then just save $VisitorIP to a text file or database.
Post Reply