Jump to content

$_SERVER['REMOTE_ADDR'] Issue


mlpnyc

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/193931-_serverremote_addr-issue/
Share on other sites

 

Thanks for the help!  I implemented that function and it still gives me the local IP of the web server.  I'm not sure if it has something to do with some security mask (We have an SSL certificate installed on the machine) or if it has to do with the fact that the home page is compiled by a number of files that are calling each other, so the real visitor IP is lost early on.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.