d.shankar Posted November 1, 2007 Share Posted November 1, 2007 When i try to run this code i get my loopback address. Though i am connected to internet and have an ip why do i get this ? <?php echo $_SERVER['REMOTE_ADDR']; ?> Link to comment https://forums.phpfreaks.com/topic/75626-find-ip-address/ Share on other sites More sharing options...
rajivgonsalves Posted November 1, 2007 Share Posted November 1, 2007 Is your page hosted on a web server or on your local machine Link to comment https://forums.phpfreaks.com/topic/75626-find-ip-address/#findComment-382663 Share on other sites More sharing options...
d.shankar Posted November 1, 2007 Author Share Posted November 1, 2007 Local Machine ! Link to comment https://forums.phpfreaks.com/topic/75626-find-ip-address/#findComment-382664 Share on other sites More sharing options...
jaymc Posted November 1, 2007 Share Posted November 1, 2007 You do mean 127.0.0.1 right? You should get a 192.168.0.x, not sure about 127 but just incase you reffering to your 192 as your loop back Link to comment https://forums.phpfreaks.com/topic/75626-find-ip-address/#findComment-382692 Share on other sites More sharing options...
d.shankar Posted November 1, 2007 Author Share Posted November 1, 2007 Yea yea i get 127.0.0.1 !! but when i visit ip2location.com they show my ip correctly instead of the above loopback Link to comment https://forums.phpfreaks.com/topic/75626-find-ip-address/#findComment-382694 Share on other sites More sharing options...
khalidorama Posted November 1, 2007 Share Posted November 1, 2007 Cool ! I tried it on my hosting server and I got the Ip Address of the webserver macine. I got this Ip 195.229.241.181 regards Link to comment https://forums.phpfreaks.com/topic/75626-find-ip-address/#findComment-382698 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.