1

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. Regards,

MyStream
  • 2,533
  • 1
  • 16
  • 33
parastar
  • 11
  • 1

2 Answers2

0

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.

Denis
  • 4,718
  • 5
  • 18
  • 20
0

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/

kzs
  • 1
  • 1
  • Thanks, So whats the kind of code that I need to write for getting something like this done, I mean can you gimmi a template? like a brief idea on how It get It done. – parastar Jun 18 '11 at 11:25
  • Error. The destination is not responding is what I got for my IP address, when I went to check out this service. I guess.. that was it... – Denis May 24 '12 at 15:47