in reply to Help with Geo::IP output
I use Geo::IPfree. when you go to the software77 website to download the database pick "Geo::IPfree format" .
Usage;
Usage;
my $host = $ENV{REMOTE_ADDR} || $ENV{REMOTE_HOST} || ''; # Module use Geo::IPfree; # Make object with database path my $geo = Geo::IPfree->new('/IpToCountry.dat'); # Memoize for speed $geo->Faster; # Get country name my $country_name = ($geo->LookUp( $host ))[1];
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Help with Geo::IP output
by Tux (Canon) on Jun 26, 2020 at 19:37 UTC |
In Section
Seekers of Perl Wisdom