GeoIP searches a GeoIP database for a given host or IP address, and
returns information about the country where the IP address is allocated.

You need at least the free GeoIP.dat, for which the last known download
location is <http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz>
This API requires the file to be decompressed for searching. Other versions
of this database are available for purchase which contain more detailed
information, but this information is not returned by this implementation.
See www.maxmind.com for more information.