This Ip2Nation module provides an API to access ip2nation database in Drupal. Actually, there is a module called ip2cc which does the same thing, but it exposes another Ip-to-Country database. Ip2nation database is better because it is optimized for queries (and so smaller and faster to use), so I made this module.
Another feature in this module is commenter’s information. You can show from which country a comment in your website is from. This is nice especially for social websites that have lots of users all around the world, or for personal blogs. Of course you can turn off this feature at will (it is, by default). If you know HTML you can put up country flags in the comments, too. Read more »