Other way to achieve geo IP targeting for free

On previous post, I already show you how to achieve geo IP targeting using MaxMind GeoLiteCountry. Now, I’ll show you on how to use other freely available geo IP API. We will use API provided by HostIP.info.

I’ve written small PHP function to call HostIP.info API:

Example usage:

Example result:

One notice though: it seems less accurate than MaxMind GeoLiteCountry in term of detecting visitor’s country

Leave a Reply

%d bloggers like this: