cjheath / geoip

The Ruby gem for querying Maxmind.com's GeoIP database, which returns the geographic location of a server given its IP address

Home Page:http://geoip.rubyforge.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cities from the country/state

cooolbasha opened this issue · comments

Hi,
Is there a way to get the cities from the country/state combination.

Thanks

On 12/11/2011, at 1:05 AM, cooolbasha wrote:

Is there a way to get the cities from the country/state combination.

Not that I know of - but you might check the C API provided by Maxmind.
If they provide a way to do what you want, we can fairly easily add it to
the Ruby version.

Clifford Heath.

Hi there, is anyone having an issue like this?

If I run in my local MACOSX:
gp = GeoIP.new('GEOIPCity.dat').city("Aguascalientes, Jalisco")
It finds the correct record, but if I run the same in our stage env, which is an Ubuntu, it works only with DNS names and IP address, does anyone know why?

I've been reading the code but I have no idea why is finding it... I'm more than happy to fix it, if you can give me a clue

The city method takes a DNS name or a string representation of an IP address - not a city name. If "Aguascalientes, Jalisco" is getting resolved, it's because your DNS service is doing it - it's nothing to do with GeoIP.