On Fri, 25 Oct 2002, darren chamberlain wrote:

> * Randy Kobes <[EMAIL PROTECTED]> [2002-10-17 17:01]:
> > I've placed at
> > ftp://theoryx5.uwinnipeg.ca/pub/other/Apache-GeoIP-0.26.tar.gz 
> > a package providing a mod_perl interface to the GeoIP library,
> > which is used to look up in a database the country of origin of
> > an IP address. See http://www.maxmind.com/ for details. 
> 
> Out of curiousity, why is your package limited to Apache?  I've looked
> at the code a bit, and don't see why the GeoIP stuff needs to be
> attached to Apache.  I'd like to see, in addition to the Apache stuff, a
> generic GeoIP library that can be used from outside Apache, like in
> log-eating scripts.

There are a couple of modules on CPAN - Geo::IP and Geo::Mirror -
that provide a general Perl interface to the GeoIP library (the
module names in the Apache-GeoIP package - Apache::Geo::IP and
Apache::Geo::Mirror - were used to suggest this). The Apache
package essentially makes available the methods of the GeoIP lib
to the request object, as well as being able to set certain
configuration options (like the database location) through
PerlSetVar directives. There's also a method in there, based on
Geo::Mirror, that can provide automatic redirection based on
country code.

-- 
best regards,
randy


Reply via email to