View Single Post
Old 12-07-2008, 11:44 AM  
mrkris
Confirmed User
 
Join Date: May 2005
Posts: 2,737
Quote:
Originally Posted by borked View Post
whadya mean? Course I'm on!

BTW, do some benchmarking with Net_GeoIP compared to a C wrapper or the apache module - net_geoip is dog slow....

When you compile the maxmind source, look in the examples folder - there's a cool shell script in there. Modify it a bit to take into account the new values, like continent code and some other new things, then have php call that script and parse the output. Far far faster for querying specific IP addresses.

Bit overkill to gain a few msecs, but thought I'd throw it out there. I needed to go that route, as I'm doing a shit load of lookups per day, so the diff between 1usec and 10msecs is huge.
Sometimes using a C wrapper or an apache2 module isn't an option, which is why I cache it.
__________________

PHP-MySQL-Rails | ICQ: 342500546

Last edited by mrkris; 12-07-2008 at 11:44 AM.. Reason: typo
mrkris is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote