It is heavy and reliable. I let him go back in time, and he went something like this.
Paid services that can do this very quickly for you. It can take a long time to get something working that is still unreliable because you simply do not have data. I would seriously think http://www.maxmind.com/en/city_per - if, of course, this is not a completely commercial project, and $ - no.
If you can get lat and long from the IP table, even without city data, then you can use something like this to check that the nearest Javascript city is optio n - Search for the nearest list (array?) Of the city from a known location .
What about browser sharing?
source share