简体   繁体   中英

What Datasource to use for ip to location conversion?

Problem :

  • I have the IP address of the user, I want to find out his location based on his IP Address

Now, Possible Solution :

  • ip2location.com
  • maxmind.com

Above sites provide the IP to location lookup service for Free. And there are some paid providers also.

So, is there some standard open database that one should use. You need a proprietary data sources to lookup the location always ?

Is there some standard open data sources ? (Provided by apnic, afrinic, etc)

There is still no standard open data sources I have read somewhere that W3C is in the process of doing something like this, but it is still in the process.

Update: Here it is the database I was talking about:

http://labs.ripe.net/Members/denis/example-usage-of-ripe-database-geolocation-prototype

Hostip, Is very accurate. Go with this.

http://www.hostip.info/use.html

Do you need the finest possible location or does the Country enough?

If Country based detection is suffices than you can download the Country IP ranges from http://www.ipaddresslocation.org/ip_ranges/get_ranges.php and check the location on your own (in your own code).

Pro to this solution is that this is very fast and you dont rely on external services.

IME, accuracy and resolution vary greatly, and even using the better systems I'd not trust the accuracy below an average of about 400 miles.

There's a free database here . IME, the country identification in here is around 93% accurate, and they provide good quality information about why some of the data appears to be inconsistent/innaccurate.

But if your users are likely to opt-in, then using the HTML5 geolocation api will give much better resolution. Another approach would be to use Google or Yahoo's APIs to map a text address and/or post/zip code to a location.

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