Free Geolocation API tool

NOTE: http://www.ip2location.com have done away with the free api access from their site. So the following sample code will no longer work. They now provide a free sample database on their site and also a complete paid version.

iplocationtools.com offers a free geolocation API that lets you query with an ip address and get the location details such as city, country, zip, latitude, longitude etc. The site also offers a free MySQL database for the same if you would like to install it on your server. I’ve used CURL to wrap the API access. The complete function with a sample query and the response is shown below.
Read More

Generating test data for MySQL

The most common type of web application a developer encounters are database related. But rarely is the case when you have the required data in your database during testing, making it a frequent source of frustration for programmers, who than have to manually populate the database. Having a dummy set of data is always a good thing.

Read More