What do people use to geo-locate a persons IP to determine the city they are in?
I've tried the built in functionality of Google API but its geo-location database seem spotty.
http://code.google.com/apis/ajax/documentation/#ClientLocation
Anyone use any other service for geo-locating with success?
The most stable company I've seen that does it is MaxMind.
A buddy of mine is using is with success.
I've used IPInfoDB (which may use the same database as MaxMind) which has straightforward XML and JSON formats to their API, along with Google's ClientLocation. Neither is perfect and they often disagree. I haven't really found one to be better than the other.
There is a community-based Geotargeting service from hostip.info. They have a nice clean API for Geotargeted IP Address Lookup. They've got over 8.6 million entries in their database.
Example:
if you add just call:
You'll get an XML document back.
Source: Scott Hanselman - The Weekly Source Code 37 - Geolocation/Geotargeting (Reverse IP Address Lookup) in ASP.NET MVC made easy
I'm using Codehelper.io Their PHP Class is nice, they can detect real IP for you, and get location , returned JSON with country, city, latidude, calling code, user's languages and more.
They also support Javascript. Check out example at their site.