Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Help with Geo::IP output

by $h4X4_|=73}{ (Monk)
on Jun 26, 2020 at 18:51 UTC ( #11118574=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11118574]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2020-09-21 07:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If at first I donít succeed, I Ö










    Results (125 votes). Check out past polls.

    Notices?