I am editing a remote server, and for some reason it is returning 127.0.0.1
, I tried it on my iPhone too and it did the same thing.
echo $_SERVER['REMOTE_ADDR']; // returns 127.0.0.1
I am editing a remote server, and for some reason it is returning 127.0.0.1
, I tried it on my iPhone too and it did the same thing.
echo $_SERVER['REMOTE_ADDR']; // returns 127.0.0.1
It mean that the client who execute the script is hosted on local host.
Could be because the script that contain $_SERVER['REMOTE_ADDR'] is called with a CURL request from another script on the same server.
Could also be because of a proxy system.
Possible indirect duplicate of Using Django, why would REMOTE_ADDR return 127.0.0.1 on a web server?