Get user real IP

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
User avatar
PaTTeR
Forum Commoner
Posts: 56
Joined: Wed Jul 10, 2002 7:39 am
Location: Bulgaria
Contact:

Get user real IP

Post by PaTTeR »

So, if user uses proxy server $_SERVER['REMOTE_ADDR'] is proxy's IP. How can get real user IP?
User avatar
PaTTeR
Forum Commoner
Posts: 56
Joined: Wed Jul 10, 2002 7:39 am
Location: Bulgaria
Contact:

Post by PaTTeR »

Huh, i find it

Code: Select all

$_SERVERї'HTTP_X_FORWARDED_FOR']
$_SERVERї'HTTP_VIA']
but these variables isn't in php doc ;-(
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

these headers are courtesy of the proxy and might be set, might be not ;)
User avatar
PaTTeR
Forum Commoner
Posts: 56
Joined: Wed Jul 10, 2002 7:39 am
Location: Bulgaria
Contact:

Post by PaTTeR »

Yes it is, but i have not any other idea ;-(
Post Reply