The Maxmind GeoIP API is now available as a TCL extension

You can download it from . You need to have the C API built and installed (as well as the necessary database files) before you can use it.

Here's a simple example:

 package require geoip

 geoip open -type isp   ;# open the ISP database (error if not installed)

 puts "country = [geoip country_code_by_name]"
 puts "isp     = [geoip name_by_name]"

This generates (as of July 2006):

 country = DE
 isp     = IPX Server GmbH

See Also