Determine your visitor’s location based on IP address

If you’re running a website that provides a service, it’s likely that it would be beneficial to know a user’s location (or have a rough idea) so that the content could be tailored to their specific geographic area. But how do you get their location, without having to ask them? By using their IP address, it’s possibly to determine their general area with fairly good accuracy. In this tutorial, I’ll explain how to do that using the free IP address geolocation database from IPInfoDB.

Continued