On the WebDigity.com website, there's a quick how-to on using geo-targeting on your website with a combination of a geolocation database and a PHP module to parse it.

There are many cases that we need to display different content to our users depending on the location that they are visiting our site. In this tutorial we will give some examples regarding geo targeting with php.

They got their geolocation database from Maxmind and loaded up this module to make it as simple as a call to geoip_open and geoip_country_code_by_addr to get the location of the remote user.