IP Address of the machine in PHP gives ::1 but why?

::1 is the actual IP. It is an ipv6 loopback address (i.e. localhost). If you were using ipv4 it would be 127.0.0.1.

If you want to get a different IP address, then you’ll need to connect to the server through a different network interface.

Leave a Comment