I have included the option with IP To Country to convert single or multiple IP addresses on the fly .

For example, if you want to display a webpage visitor's flag icon beside his username, you can use IP To Country in an image tag along with the visitor's IP address to make it easy.
Here's an example:
<img src="http://jasonlau.biz/ip2country/flag/{IP HERE}">
The PHP code would look like this:
echo "<img src=\"http://jasonlau.biz/ip2country/flag/" . $_SERVER['REMOTE_ADDR'] . "\">\n";
There are several modes to choose from and the mode is easily changed in the URL address for IP To Country.
Example:
http://jasonlau.biz/ip2country/{MODE HERE}/
{IP HERE}The modes are as follows:
xml - Generates xml 1.0 file containing all of the following data.
rss - Generates rss 2.0 file containing all of the following data.
ipv4 - Generates an IPv4 Internet network address.
cc1 - Country Code 1 Example: US
cc2 - Country Code 2 Example: USA
cn1 - Country Name 1 Example: UNITED STATES
cn2 - Country Name 2 Example: united states
cn3 - Country Name 3 Example: United States
flag - Generates flag icon for that country
You can also make direct requests by using your browser and entering the following URL into the browser's address bar:
http://jasonlau.biz/ip2country/{MODE HERE}/
{IP HERE}IP To Country will also accept a comma separated list of IP addresses and will return a comma separated list of results.
Example:
http://jasonlau.biz/ip2country/{MODE HERE}/
{IP HERE},
{IP HERE},
{IP HERE} 