mlpnyc Posted March 2, 2010 Share Posted March 2, 2010 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 More sharing options...
dennismonsewicz Posted March 2, 2010 Share Posted March 2, 2010 I found this http://josmykutty.blogspot.com/2008/02/php-function-remoteaddr-is-not-working.html Hope it helps Link to comment https://forums.phpfreaks.com/topic/193931-_serverremote_addr-issue/#findComment-1020574 Share on other sites More sharing options...
mlpnyc Posted March 2, 2010 Author Share Posted March 2, 2010 I found this http://josmykutty.blogspot.com/2008/02/php-function-remoteaddr-is-not-working.html Hope it helps 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. Link to comment https://forums.phpfreaks.com/topic/193931-_serverremote_addr-issue/#findComment-1020589 Share on other sites More sharing options...
kts Posted March 2, 2010 Share Posted March 2, 2010 Are you running this off a local machine that you are testing it on? Link to comment https://forums.phpfreaks.com/topic/193931-_serverremote_addr-issue/#findComment-1020642 Share on other sites More sharing options...
mlpnyc Posted March 2, 2010 Author Share Posted March 2, 2010 Are you running this off a local machine that you are testing it on? No, the page is live on the web server, and not on a local machine. When I access the site, it is from the internet, not looking at local files. Link to comment https://forums.phpfreaks.com/topic/193931-_serverremote_addr-issue/#findComment-1020643 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.