1Geo::IP::Record(3)    User Contributed Perl Documentation   Geo::IP::Record(3)
2
3
4

NAME

6         Geo::IP::Record - Contains city information for GeoIP Legacy City Edition
7

SYNOPSIS

9         use Geo::IP;
10
11         my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
12
13         my $record = $gi->record_by_addr('24.24.24.24');
14
15         print $record->country_code,
16           $record->country_code3,
17           $record->country_name,
18           $record->region,
19           $record->region_name,
20           $record->city,
21           $record->postal_code,
22           $record->latitude,
23           $record->longitude,
24           $record->time_zone,
25           $record->area_code,
26           $record->continent_code,
27           $record->metro_code;
28

DESCRIPTION

30       Geo::IP::Record represents objects containing location information
31       returned by the GeoIP Legacy City database.  It works with both the
32       commercial GeoIP Legacy City and free GeoLite Legacy City databases.
33

OBJECT METHODS

35       $code = $record->country_code;
36           Returns the ISO 3166 country code from the location object.
37
38       $code3 = $record->country_code3;
39           Returns the ISO 3166 3 letter country code from the location
40           object.
41
42       $name = $record->country_name;
43           Returns the country name from the location object.
44
45       $region = $record->region;
46           Returns the region code from the location object.
47
48       $region = $record->region_name;
49           Returns the region name from the location object.
50
51       $city = $record->city;
52           Returns the city from the location object.
53
54       $postal_code = $record->postal_code;
55           Returns the postal code from the location object.
56
57       $lat = $record->latitude;
58           Returns the approximate latitude of the location associated with
59           the IP address. This value is not precise and should not be used to
60           identify a particular address or household.
61
62       $lon = $record->longitude;
63           Returns the approximate longitude of the location associated with
64           the IP address. This value is not precise and should not be used to
65           identify a particular address or household.
66
67       $time_zone = $record->time_zone;
68           Returns the time zone from the location object.
69
70       $area_code = $record->area_code;
71           Returns the area code from the location object (for city-level US
72           locations only)
73
74       $metro_code = $record->metro_code;
75           Returns the metro code from the location object (for city-level US
76           locations only)
77
78       $continent_code = $record->continent_code;
79            Returns the continent code from the location object.
80            Possible continent codes are AF, AS, EU, NA, OC, SA for Africa, Asia, Europe, North America, Oceania  and South America.
81

VERSION

83       1.51
84

AUTHOR

86       Copyright (c) 2016, MaxMind LLC
87
88       All rights reserved.  This package is free software; you can
89       redistribute it and/or modify it under the same terms as Perl itself.
90
91
92
93perl v5.38.0                      2023-07-20                Geo::IP::Record(3)
Impressum