IP based geolocation?
IP-based geolocation is the mapping of an IP address or MAC address to the actual geographic location of computers or mobile devices connected to the Internet. Geolocation includes displaying information by fields such as: country, region (city), latitude/longitude, Internet Service Provider, and domain name, among other flavors.
Where can I get an IP based geolocation base?
There are a number of commercially available geolocation databases, their price and accuracy may vary. Ip2location, MaxMind, Tamo Soft, DB-IP, Ipinfo and IPligence offer paid databases that can be easily integrated into a web application. Most geolocation database vendors offer APIs and sample codes that can be used to extract data from the database. We provide free geolocation data on our site.
There are also freely available geolocation databases. Vendors that offer a commercial geolocation database also offer a lightweight or public version that provides IP address mappings for countries. Ip2Country.net and Webhosting.info (Directi) offer a free country IP address database that can also be integrated into your Web application. There are companies that also offer free web services that you can use to display IP address geolocation on your site.
How accurate is IP-based geolocation?
The accuracy of the geolocation database depends on the database used. Some vendors claim to provide 98% to 99% accuracy for IP databases in the country, although the usual accuracy of the Ip2Country database is over 95%. For IP in a region (or city), accuracy ranges from 50% to 75% if neighboring cities are considered correct. Given that there is no official source of IP address information in the region, an accuracy of 50+% is pretty good.
How does IP geolocation work?
The ARIN Whois database provides a mechanism for finding contact and registration information for ARIN-registered IP resources. Whois IP information is provided free of charge, and it is fairly easy to determine the country from this database. When an organization needs a block of IP addresses, a request is sent and the assigned IP addresses are sent to the requested provider.