http://qs321.pair.com?node_id=11118574


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;
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 (Abbot) on Jun 26, 2020 at 19:37 UTC

    The big disadvantage of Geo::IPfree is that it only returns the country.


    Enjoy, Have FUN! H.Merijn