0

I want to get the localhost IP address . I am using the php $_SERVER super global:

$_SERVER['REMOTE_ADDR']; I get my IP address and see it is different from my IP address my output like this ::1 my result is right or wrong how can we find it

VK.Anup
  • 33
  • 8

2 Answers2

0

That's correct - it's an IPv6 address.

Ray O'Donnell
  • 759
  • 4
  • 11
0
The result whatever you are getting is right..!!!

::1 is the actual ip address.
 It is an Ipv6 address in localhost
 If you use Ipv4 it will give 127.0.0.1 in localhost..
Soniya Basireddy
  • 369
  • 2
  • 10