Databases: phpIP2Country
Mike Leigh (contact me)
This class can be used to determine the country of a given IP searching in an IP range database.
It accesses a SQL database that has a table with the countries associated to each known IP range.
The IP address to check is searched to determine which IP range it belongs. If its IP range is found, the class returns the associated country code.
The IP ranges database table can be populated with separate script from IP range file in CVS format that can be obtained from the IP to country service site.
Click here for detailed information about this class on phpclasses.org