christian harms

Christian Harms's picture

Tutorial for a IP to geolocation aggregator script

If you provide a restaurant guide it would be great to show the next restaurant based on webpage visitors position or the local beer garden specials if its sunny weather? Or offer geo targeted ads on your page? And this could be offered without registration or connection to a social network? I will describe the api/implementation details and offer directly our free "ip to geolocation aggregator"-script.

The first step is determining geo location based on Internet IP address of the visitor. I have found five free service providers which offer data based on the client-IP the geo position and city/country data. Classic "ip to geolocation data offers" are commercial. You have to buy and download a sql dump or csv file with ip ranges from isp with country and city data - some expanded with long/lat values. The second solution (and to save hosting space) is using a http api which offer theses data directly when being called - these looks like the preferred possibility. And the third way is to include a javascript which can integrate the geo position directly without need of a server component.Read more

Syndicate content