Library to find the country that any IP address originates from
GeoIP is a C library that enables the user to find the country that any IP address or hostname originates from. It uses a file based database. This database simply contains IP blocks as keys, and countries as values. This database should be more complete and accurate than using reverse DNS lookups. MaxMind offers a service where you can have your database updated automically each month.