Different geolocation demos show very different results when it comes to detecting my location.
I’m from France, Bordeaux, and expecting at least the city to be shown. Unfortunately, in most cases the city is wrong, and corresponding probably to the location of the servers of the ISP.
Here are the results taken at the same moment from three of top five Google “geolocation ip” results:
http://www.ip2location.com/ – wrong answer

http://www.ipligence.com/geolocation – another, different wrong answer

http://www.infosniper.net/ – right answer

Even if the last one, on the very home page, ensures that I have an error in my SQL syntax, it is at least the only website that displayed the right location among those I’ve tried.
None of the three websites use HTML5, unlike Google Maps. Google Maps, using HTML5, seems to get the right city too.
- How those non-HTML5 websites get a location of a desktop PC?
- Why most of them are totally wrong?
- How to get it right?
Looking up your IP address against a database which maps IP addresses to locations.
Because they have wrong data in the database.
Ask the user.