ip2country PHP is a class for getting a visitor's IP address, country name, two and three letter country codes, and flag. It currently covers 243 countries and 111283 IP ranges. There are currently four database versions to choose from, MySQL, PHP, CSV, and XML.