Question

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 ?

OTHER TIPS

You're looking for an IP geolocation service such as MaxMind.

ip2location.com provides an IP range database which can be used to tag IP addresses

they provide it in different formats as well so you can choose which one is useful to you

Maxmind is the one we use

Open Sourced self contained flag rendering based on IP: ip2ensign

It will lookup UV coordinates in a flag texture atlas that matches an arbitrary IP. And it comes with the IP range database and the texture.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top