Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Asvin Balloo's Blog:
Geolocate your visitors with PHP (part 1)
Jul 21, 2008 @ 13:49:29

On his blog today Asvin Balloo has posted the first part of his look at his method for geolocating the visitors to your website using the PEAR GeoIP package and the MaxMind GeoLite Country information.

In this first part, he just makes sure that you have what you need installed before really getting started. Brief installation instructions are provided and example code is included to make sure things are up and working correctly (a lookup for whatever IP you're coming from).

It uses the lookupCountryName method to translate the information based on the MaxMind data.

tagged: geolocate visitor maxmind pear geoip geolite tutorial

Link:

Derick Rethans' Blog:
Detecting Timezone By IP
May 07, 2008 @ 16:15:24

Derick Rethans has posted a method he's come up with to try to figure out the user's timezone based on the IP address they're using:

Through Planet PHP I found an article on Pre-populating forms with the timezone. I'd normally add a comment instead, but the comment would almost be larger then the original post, so I am instead writing up an entry myself. The post describes several ways to obtain the user's timezone and use that to pre-fill a form. None of them are working properly though.

In Derick's method combines a bit of Javascript with some PHP to correctly find the timezone.

tagged: detect timezone ipaddress maxmind goeonames ip2location

Link:

DeveloperTutorials.com:
Effective Geotargeting with PHP
Jan 28, 2008 @ 15:47:00

The Developer Tutorials blog has a new article that talks about their method for creating simple geotargeting for your visitors.

In this tutorial, we'll take a look at the technique of geotargeting, or serving content to users based on their physical location. The technology is invaluable; with simple techniques, you can target advertising to specific users, collect more accurate usage statistics, serve content in different languages for different regions and provide local information like weather reports to your visitors.

They use the GeoIP services offered by Maxmind to perform the IP to location translation and the PEAR package already created to make the integration as painless as possible.

tagged: geotargeting tutorial geoip maxmind pear package

Link:


Trending Topics: