GeoIP Introduction
The GeoIP technology allows the web masters to get valuable information about the location of their visitors. It can determine the country, city, area code and much more. The web site developers use it for delivering of customized content based on the geographical location, targeted advertisements, web logs and statistics, spam prevention, location restricted access and other useful solutions.
However, the GeoIP database is a paid one.
Fortunately, there is a free GeoIP alternative – GeoLite. It is already used for different script extensions.
It can be downloaded from the following location:
http://www.maxmind.com/app/geoip_country
The GeoLite database contains information like IP ranges, country code, country name and other details.
The existing extensions compare the IP of the visitors against the database records and visualize the matches.
Besides the visualization of the visitors’ location details the query results can be used for many other operations. Among them is the restriction of the web site access based on the geographical location and the limitation of web site registration from different countries. In this way you can show your web site content just for a targeted audience and significantly decrease the spam posts in your web forums.
Sample implementations will be shown in the next chapters of the FastWebHost’s GeoIP tutorial.