PHP Code

PHP: Geolocation on IP Addresses

Any time I take information from a visitor/client/customer via the some type of form post (cart order, forum post, contact form, etc.) I usually log the IP address it came from. This is good information to have in case someone abuses your services and you need ban them but we can also use it to see where they are from. Geolocation with an IP address is an easy thing to accomplish in PHP and can shed some light on where your visitors/customers are coming from. You see it often in stat reporting software like Google Analytics but it’s very easy to add into your own web applications.

Read more