How to get the Country according to a certain IP? [duplicate]

There are two approaches: using an Internet service and using some kind of local list (perhaps wrapped in a library). What you want will depend on what you are building. For services: (as mentioned by Mark) For lists: (as mentioned by Orion) You could roll your own by downloading the lists from … Read more