
|
|
|||
Effective Geotargeting with PHPBy Akash Mehta2008-01-27
Getting started The database is the key to all our GeoIP work — the better the database, the more accurate the country check. The free database from MaxMind offers “Over 98%” accuracy, which is pretty good, but a 2% failure rate can be a little high for businesses. We'll stick to the free version for the moment; you can grab a copy here — you'll need the “latest GeoLite Country Binary Format” version. You'll also need to get their PHP library here. Finally, download and install the PEAR package, Net_GeoIP — you can do this via command line or grab the package file here. Access to a PHP webserver is assumed. Of course, there's no need to try out these samples; the code is pretty light-weight so you can follow along without testing it out. Incidentally, if you want to write your own lookup system, a CSV version of the actual IP database is available that is very easy to work with when imported into a SQL database. Bear in mind, however, that the database is very large, and another lookup to a database table for every single user can cause significant server load. Tutorial Pages: » Introduction » IP Targeting: It’s tricky business! » Getting started » Let's write some code! » Tips and tricks » Going further |
||||
| About the NetVisits, Inc Network | Write For Us | Advertise Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy. |
Visit other NetVisits, Inc. sites: |