Page 1 of 1

$_SERVER['REMOTE_ADDR'] Issue

Posted: Tue Mar 02, 2010 1:22 pm
by mlpnyc
Hey, all.

First post to the forums here. Thanks, in advance, for any help with my issue.

I'm using the $_SERVER['REMOTE_ADDR'] command to get the IP address of the visitor to my page, but it's returning only the local IP address for the web server (e.g. 12.0.0.1), regardless of where the site is hit from and what network is being used for the hit. Can someone point me in the direction of the error in either the config or the code? I need to be able to see story hits that occur in-hosue versus those from external computers.

Thanks so much for the help.

Michael
New York, NY.

Re: $_SERVER['REMOTE_ADDR'] Issue

Posted: Tue Mar 02, 2010 2:25 pm
by greyhoundcode
I take it your website is accessible on the web, it isn't on a local development server?

Re: $_SERVER['REMOTE_ADDR'] Issue

Posted: Tue Mar 02, 2010 2:30 pm
by mlpnyc
greyhoundcode wrote:I take it your website is accessible on the web, it isn't on a local development server?
That's correct.

Re: $_SERVER['REMOTE_ADDR'] Issue

Posted: Wed Mar 03, 2010 2:44 pm
by greyhoundcode
Are your other $_SERVER indices as expected? Like HTTP_USER_AGENT?

Re: $_SERVER['REMOTE_ADDR'] Issue

Posted: Wed Mar 03, 2010 3:34 pm
by Benjamin