Page behind proxy / Google Page Speed
-
my site is running through google page speed service, so everywhere where $_SERVER[‘REMOTE_ADDR’] is used to determine the user’s IP, it returns the Google’s IP.
here is the fix:
$ip = explode(‘,’,$_SERVER[‘HTTP_X_FORWARDED_FOR’]);
$ip = $ip[0];
if ( !$ip || $ip == ” ) $ip = $_SERVER[‘REMOTE_ADDR’];
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Page behind proxy / Google Page Speed’ is closed to new replies.