Mika Tuupola [1] has updated the PHP implementation of the IP to Country conversion based on the database provided by Directi [2]. There has recently been a brought up a new ip-to-country database format.
[1] http://www.appelsiini.net/~tuupola/archives/110/
[2] http://ip-to-country.directi.com