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 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->dma_code,
26               $record->area_code;
27

DESCRIPTION

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

OBJECT METHODS

34       $code = $record->country_code;
35           Returns the ISO 3166 country code from the location object.
36
37       $code3 = $record->country_code3;
38           Returns the ISO 3166 3 letter country code from the location
39           object.
40
41       $name = $record->country_name;
42           Returns the country name from the location object.
43
44       $region = $record->region;
45           Returns the region code from the location object.
46
47       $region = $record->region_name;
48           Returns the region name from the location object.
49
50       $city = $record->city;
51           Returns the city from the location object.
52
53       $postal_code = $record->postal_code;
54           Returns the postal code from the location object.
55
56       $lat = $record->latitude;
57           Returns the latitude from the location object.
58
59       $lon = $record->longitude;
60           Returns the longitude from the location object.
61
62       $time_zone = $record->time_zone;
63           Returns the time zone from the location object.
64
65       $dma_code = $record->dma_code;
66           Returns the DMA code from the location object (for city-level US
67           locations only)
68
69       $area_code = $record->area_code;
70           Returns the area code from the location object (for city-level US
71           locations only)
72

VERSION

74       1.20
75

AUTHOR

77       Copyright (c) 2006, MaxMind LLC
78
79       All rights reserved.  This package is free software; you can redisā€
80       tribute it and/or modify it under the same terms as Perl itself.
81
82
83
84perl v5.8.8                       2004-09-20                Geo::IP::Record(3)
Impressum