GeoIP looks up a GeoIP database to provide geographical data for an IP address or Internet hostname. The free version of the GeoIP database available from www.maxmind.com only contains country information. This library supports that and the GeoIPCity file (both revisions). The data is much more reliable than using the country codes at the end of the hosts’ domain names. GeoIP is a pure-Ruby replacement for some of the functionality in the wrapped C library by Sean Chittenden. Given an IP address or hostname, it looks up the country where that IP address is allocated.
Homepage: http://polyplex.org/cjh