geoip icon indicating copy to clipboard operation
geoip copied to clipboard

cities from the country/state

Open cooolbasha opened this issue 13 years ago • 3 comments

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

Thanks

cooolbasha avatar Nov 11 '11 14:11 cooolbasha

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.

cjheath avatar Nov 13 '11 23:11 cjheath

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

joseluistorres avatar Jun 02 '12 00:06 joseluistorres

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.

cjheath avatar Jun 02 '12 01:06 cjheath