blueman378 Posted November 29, 2008 Share Posted November 29, 2008 hi guys, any idea how to stop $_SERVER['REMOTE_ADDR']; returning 127.0.0.1 and instead return my actual ip? Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/ Share on other sites More sharing options...
beansandsausages Posted November 29, 2008 Share Posted November 29, 2008 are you using a localhost? ie a test enviroment on your computer? Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/#findComment-701571 Share on other sites More sharing options...
blueman378 Posted November 29, 2008 Author Share Posted November 29, 2008 yeah, and i only have one computer hence me wanting to tell show my actual ip instead of 127.0.0.1 cause thatway for test purposes i can change my ip and have a look Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/#findComment-701585 Share on other sites More sharing options...
beansandsausages Posted November 29, 2008 Share Posted November 29, 2008 127.0.0.1 is your ip. thats the ip you get in localhost / test enviroment.... as far as i am aware of any way. Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/#findComment-701589 Share on other sites More sharing options...
blueman378 Posted November 29, 2008 Author Share Posted November 29, 2008 yeah i was aware of that, thanks anyway, but is there anyway to override that effect? Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/#findComment-701593 Share on other sites More sharing options...
beansandsausages Posted November 29, 2008 Share Posted November 29, 2008 not that im aware of, you will have to set it maualy, in a $var but im no guru so i could be wrong Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/#findComment-701594 Share on other sites More sharing options...
blueman378 Posted November 29, 2008 Author Share Posted November 29, 2008 lol all good, ill just hold my breath and hope it does what i want when it goes live... although that tends not to work for me all to well.... i once made a file which was meant to go through a directory and rename all files which contained a specific word and then go through all files and replace some words in them... i forgot to add in a failsafe for the starting point it went right through everywhere it had access to on my computer and did them opps Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/#findComment-701595 Share on other sites More sharing options...
bzz Posted November 29, 2008 Share Posted November 29, 2008 best way would be to visit http://whatismyip.com/ get your external IP and set a variable to that.. then use that for testing; it should work the way you want it to. Link to comment https://forums.phpfreaks.com/topic/134728-_serverremote_addr-returning-127001/#findComment-701620 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.