Help for this page

Select Code to Download


  1. or download this
    response = reader.city('128.101.101.101')
    response.country.name
    
  2. or download this
    use GeoIP2::Database::Reader;
    my $ip = ('128.101.101.101');
    my $reader = GeoIP2::Database::Reader->new(file => 'GeoLite2-Country.m
    +mdb');
    my $record = $reader->country($ip);