| Geo::IP::Record(3pm) | User Contributed Perl Documentation | Geo::IP::Record(3pm) |
Geo::IP::Record - Contains city information for GeoIP Legacy City Edition
use Geo::IP;
my $gi = Geo::IP->open("/usr/local/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
my $record = $gi->record_by_addr('24.24.24.24');
print $record->country_code,
$record->country_code3,
$record->country_name,
$record->region,
$record->region_name,
$record->city,
$record->postal_code,
$record->latitude,
$record->longitude,
$record->time_zone,
$record->area_code,
$record->continent_code,
$record->metro_code;
Geo::IP::Record represents objects containing location information returned by the GeoIP Legacy City database. It works with both the commercial GeoIP Legacy City and free GeoLite Legacy City databases.
Returns the continent code from the location object.
Possible continent codes are AF, AS, EU, NA, OC, SA for Africa, Asia, Europe, North America, Oceania and South America.
1.51
Copyright (c) 2016, MaxMind LLC
All rights reserved. This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| 2025-01-04 | perl v5.40.0 |