简体   繁体   中英

Is there is any way to get users location by IP address?

是否有任何类型的API或第三方服务通过提交IP地址来提供用户位置(州/城市)作为返回值?

This form of IP lookup is called Geolocate by IP. Try Googling for this and you will find a bunch of different companies offering the service either Paid or Free.

From my experience, if you want to get an accurate lookup, you will need to pay. If you don't mind the service to be off (quite often), then go with the free.

Maxmind seems to be the leader in this domain.

You can use this website or download the database to use it the way you want

Another webiste (Free)

You'd need to us an IP to Location geolocation service. This is an example : http://www.maxmind.com/app/city

There is also a free version that doesn't give a precise location - http://software77.net/geo-ip/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM