Get location form a users IP address

前端 未结 1 1193
执念已碎
执念已碎 2021-01-24 15:07

I am trying to get a location from a uses IP address. There is a lot of topics on how to do this. I really like this one, it works and is very clear. The IP address used in the

相关标签:
1条回答
  • 2021-01-24 15:25

    192.168.0.7 is your private IP address. It is only valid within your local (home,work...) network. Because it is only valid inside your local network, it cannot be used for location. In fact, there are probably millions of other computers in the world right now that also have this private IP address within their own networks.

    2.126.219.101 is your public IP address. As far any machine outside of your local network is concerned, that is your IP address. It can be used to give an indication of location.

    0 讨论(0)
提交回复
热议问题