Countriesdb is a project mainly written in ..., it's free.
See http://www.appartisan.com/labs/countriesdb for more information.