I want to show country flag depending on ip address I receive at server side. Are fixed ip addresses are assigned to countries ? Where can I get database for ip address to country mapping ?
Take a look at the following:
Also on Stack Overflow:
Once you have the country code, then you can display the flag with these free icon sets which use ISO country codes:
PHP Advent also just published a whole article on a very similar process: