26
When I use search engines for certain searches, mainly related to maps or commercial establishments, these systems usually serve me results relevant to my geographical location.
When I’m on the PC, search engines may not even know my geographic position with GPS accuracy, but at least they know what city I’m in.
I believe this is determined by the IP address, since usually a specific address range is provided by the provider for well-defined regions.
But at the implementation level, how is this determination made? Is there a formula to determine the user’s city or region from its address? Or at least one known provider from which we may consume a service to obtain that information?
I remembered at the time of that XKCD... Unfortunately I couldn’t find any information either on the forum, blog post or Slashdot about how this map was made (I didn’t dig deep enough, though). And from what I read here, most IP geolocation databases are commercial (paid), and their quality varies greatly.
– mgibsonbr
It doesn’t answer your question, but it could be a start. I found here a country/IP band ratio.
– gmsantos
It is also worth remembering that this information is organic (changes frequently) and ad hoc (the distribution of ips is done by ICANN and the databases available there are built part with this ICANN database and part through statistical samples). This means that the best geoip service offers no more than 90 to 95% country security and no more than 80-90% city information.
– lolol