I can get remote add from $_SERVER['REMOTE_ADDR']

Status
Not open for further replies.

Dead-i

x10Hosting Support Ninja
Community Support
Messages
6,084
Reaction score
368
Points
83
Hi seriesce,

You are unable to use REMOTE_ADDR to get the user's IP address because all your website's traffic is routed through a cache server first, to help speed up your site.

Instead, please use $_SERVER['HTTP_X_FORWARDED_FOR'] to get the user's IP address. ;)

Thank you,
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
No, Dead-I! Give the man what he wants!

:p

I'll look into this.
 

seriesce

New Member
Messages
24
Reaction score
0
Points
1
Hi seriesce,

You are unable to use REMOTE_ADDR to get the user's IP address because all your website's traffic is routed through a cache server first, to help speed up your site.

Instead, please use $_SERVER['HTTP_X_FORWARDED_FOR'] to get the user's IP address. ;)

Thank you,
cool, thanks.
 

bdistler

Well-Known Member
Prime Account
Messages
3,534
Reaction score
196
Points
63
You are unable to use REMOTE_ADDR to get the user's IP address because all your website's traffic is routed through a cache server first, to help speed up your site.
Instead, please use $_SERVER['HTTP_X_FORWARDED_FOR'] to get the user's IP address.
as for --> "You are unable to use REMOTE_ADDR..."
x10hosting's free-hosting server [ xo4 ] shows for both - $_SERVER['HTTP_X_FORWARDED_FOR'] and $_SERVER['REMOTE_ADDR'] --> the remote address
My understanding is - [ xo4 ] - which is running [ Apache ] - is on the other side of the [ Varnish ] server
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Yup. I'm working with management to implement this fix for xo1, xo2, and xo3.
 
Status
Not open for further replies.
Top