Jump to content

Recommended Posts

Posted (edited)

After searching how to get the Country and City from a specific IP, I found that the fastest and only method was using this COM object provided by http://dev.maxmind.com/geoip/downloadable where the download link is this one http://www.maxmind.com/GeoIP-COM-1.3.zip

It is a pretty basic and simple COM but I don't know how to implement it in a script >_< :think:

I will really apreciate any little help :) Thanyou

Edited by Rickname
Posted

Check GeoIP_doc.txt. There you'll find how to register the DLL. In the examples directory you'll find the ASP example that show how to create the object and then use the properties and methods.

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted

Please do not post the in different forums :naughty:

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

Thanks alot water ( also I like more water than coca-cola ;) ) ! Yes I won't post cloned threads anymore but I couldn't delete my first thread and it was posted in the wrong section >_<.

One more little thingie , how that .ASP file can show to me the rest ? :thinking:

Edited by Rickname
Posted

The documentation tells you all you need. The ASP example translated to AutoIt to return the city for a hostname:

Global $oGeoIp = ObjCreate("GeoIPCOMEx.GeoIPEx")
$oGeoIp.set_db_path("C:\Program Files\GeoIP\")
$oGeoIp.find_by_name($sHostname)
$sCity = $oGeoIp.city
Untested!

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted (edited)

  On 4/28/2013 at 6:49 PM, 'water said:

The documentation tells you all you need. The ASP example translated to AutoIt to return the city for a hostname:

Global $oGeoIp = ObjCreate("GeoIPCOMEx.GeoIPEx")
$oGeoIp.set_db_path("C:\Program Files\GeoIP\")
$oGeoIp.find_by_name($sHostname)
$sCity = $oGeoIp.city
Untested!

Dude, you're awesome, I don't have words ! Thanks a ton !!! IT just works ! I registered the dll as described, put there the datebase and the script you provided...its just awesome thanks dude !!

EDIT : I will make a UDF with this just for the ppl who will still need this :)

Edited by Rickname
Posted

Glad to be of service :D

My UDFs and Tutorials:

  Reveal hidden contents

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...