Integrate with GeoIP API module
webchick - February 24, 2009 - 23:06
| Project: | Ad GeoIP |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Description
On MaxMind's site they offer a free pure PHP version of their library. It seems like using this instead of requiring a PECL extension etc. would open this module up to a lot more people who don't have that kind of flexibility to monkey around on their servers.

#1
And the answer appears to be... no, not easily. ;)
The first problem is there's no geoip_db_avail() function when you go this route. If I create one manually when that function doesn't exist, something still isn't working quite right because it's not saving the country association.
Here's a very incomplete and terribly crappy patch, but possibly something to start from.
#2
Oooo. I just found http://drupal.org/project/geoip tonight. This is a much better idea. Basically, remove all of the stuff about checking GeoIP to see if it's installed, maintaining state, etc. and leave it to GeoIP API module to figure out. This module need only worry about the Ad -> GeoIP integration.
The only problem is that the module doesn't yet support city/region levels, which this module does. For my purposes, Country is fine-grained enough, so I'll try and get something working and post back here.
#3
I'm certainly not opposed to seeing the ad_geoip module properly integrated with the geoip module. A couple potential issues:
Once these two issues are solved, I'm all for moving forward with this.
#4
Well, even though the project page says country only, http://drupal.org/node/383086 implies city support was committed, although I admit to not having looked at the code since whenever I posted that issue. :)
Might be worth a look. Also my experience with Roger is he's a very responsive maintainer who would gladly accept patches.
#5
Great! It's not clear to me if it also supports the commercial offerings (which are more accurate). And equally important, I do not yet see a solution for my performance concerns: we need to filter/serve advertisements without bootstrapping Drupal.
I'm not opposed to this idea, but it's not a project I'm likely to take on anytime soon as what we currently have works well for my current needs. Sorry. I'm moving into a postponed state, awaiting a patch that addresses all of these concerns.