I'm calling $_SERVER["REMOTE_ADDR"] and it returns '::1'
Any ideas why am I getting this strange output? How to get a proper ip?
::1
is the IPv6 equivalent of 127.0.0.1
which is the IP address of your local (loopback) interface.
More information here: http://en.wikipedia.org/wiki/Localhost
How to get a proper ip?
You can disable IPv6 in your webserver to only serve IPv4 hosts. This way, you will only get propers IP adresses in $_SERVER["REMOTE_ADDR"]