More than 2 months have passed since I started working on GeoIP server and client libraries. The libraries are now ready to use. They provide IP address based Geolocation information.
To use the client library, all you have to do is – create a GeocodeIpclient object and perform a search for Geolocation information. The search function has both synchronous and asynchronous versions –
void geocode_ipclient_search_async (GeocodeIpclient *ipclient,
char *geocode_ipclient_search (GeocodeIpclient *ipclient,
To have a better look at how to call these functions visit test-geoip.c
Since we do not have a web service yet, you have to run the GeoIP server at your localhost before you use the client to query for geolocation.
Last week, I’ve added support to update Maxmind city and country databases. Since IP addresses are reassigned, the databases need to be updated. If they are not updated, they loose about 1.5% accuracy each month.
Maxmind update their databases on first Tuesday of every month. So all you need to do is to run the updater (we call it geoip-update) from a cron job. That way you don’t have to worry about downloading the databases manually.
If you are interested to know how accurate the Geolocation data is then visit this link
If you use the Geocode GeoIP libraries now, you will see that the geolocation information based on IP is not as accurate as your google map shows in your smart phone or firefox shows if you enable location sharing from it. That’s because they use a lot of other information e.g. WiFi access point data, cell tower ids etc. to provide you a very accurate location.
The next task that I am working upon now is to increase accuracy of GeoLocation information provided by Geocode GeoIP libraries.