How to get city name based on IP address in java?

后端 未结 3 1726
心在旅途
心在旅途 2020-12-03 16:48

Is it possible to know the city name based on IP address in java?

3条回答
  •  感情败类
    2020-12-03 17:13

    You have to use a service such as hostip.info that maps an IP to its physical location, and offer an API to developers to simplify the task.

    There are many other services, paid and for free, that you can find at Google.

提交回复
热议问题