Wrong Public IP address

Status
Not open for further replies.

sunilame88

New Member
Messages
22
Reaction score
0
Points
1
Hello sir,,,

I have made a php page to display the public IP address of the user who'll open it...

www.sonuame.x10hosting.com/ip

previously it was showing correct public ip address but now its showing something different as compared to

www.whatismyip.org

i didn change the coding at all...

i need this cuz i usually run some sort of servers temporarily to transfer my files and pages...

why it so...???
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
They are currently going through a reverse proxy front end so that the Apache environmental variable

REMOTE_ADDR

turns out to be the IP address of the proxy instead of the visitor. Not sure if/when they can adjust that.

In the mean time, you can use either

HTTP_X_FORWARDED_FOR
HTTP_X_REAL_IP

which should be set and pointing to the visitor's IP.
 

sunilame88

New Member
Messages
22
Reaction score
0
Points
1
Oops...

i think i have to give up the idea of displaying public IP..

its still showing the proxy ip..

69.175.121.66

and thats seriously not mine........
:frown::frown::frown::frown::frown::frown::frown::frown::frown::frown:
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
That is the IP from the proxy. This is something we're going to look into in the coming days. You can use what descalzo said above as a work around for now.
 
Status
Not open for further replies.
Top