开发者

City Wise Geo targeting (The right way.)

I'm familiar with country-wise geo-targeting, but I was wondering about city-wise geo-targeting since I was looking at a site that would be looking at users' IPs and classifying them based on their city (i.e major cities like Los Angeles, New York, Mumbai, London, etc).

The classification could be based on the population or any other yardstick (any advice about this one?).

I know about MaxMind's services but do they target city-wise?

Can you guys help me out here and dish out a way to get this done, step by step in a simple way.

Thanks a lot, this will really help me out here. Reg开发者_开发技巧ards,


I highly recommend the Spotter Geolocation Service. It's free and measurement-based, so you won't get non-sense results.

http://spotter.etomic.org/


We ran into a similar problem and here is our solution to this:

  1. We use MaxMind City database, to determine the country. We do trust it for the 2 letter country codes. But we do not trust it for the city results.

  2. We downloaded the Maxmind free world city database that contains about 2.700.000 records from here: http://www.maxmind.com/app/worldcities

  3. I splitted this database into separate files each one starts with the two letters country code (for example "us.txt", "fr.txt", "it.txt") and the file contains whatever data we need, but obviously name of the cities and their lan/lats.)

  4. We provide a text form with auto-complete and ask the user to type in his city...

The other step could be to return to MaxMind City's results and just check that the chosen city is not 600 miles away from the location chosen by the user... But basically, this is what we chose to implement for one of our social sites, where we needed to know a more or less precise location of our users.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜