Geo::IP::Record(3pm)
๐ Geo::IP::Record ๐
okay bestie, so this is a page from the User Contributed Perl Documentation, and it's all about Geo::IP::Record โ the lil' object that holds all your city info from the GeoIP Legacy City Edition. iykyk.
โจ NAME โจ
Geo::IP::Record โ it's giving ๐ contains city information for GeoIP Legacy City Edition ๐
๐ธ SYNOPSIS ๐ธ
here's the whole vibe in one go, no cap:
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;
open the db, grab a record for an IP, print literally everything. main character energy fr fr ๐
๐ DESCRIPTION ๐
so basically, Geo::IP::Record is the object that holds all your location info, and it gets handed to you by the GeoIP Legacy City database. ๐๏ธ
and the best part? it works with both of these, no drama:
- the commercial GeoIP Legacy City database ๐ฐ
- the free GeoLite Legacy City database ๐
๐ฆ OBJECT METHODS ๐ฆ
every single one of these is a method you call on your $record. collect them like stickers. ๐
$code = $record->country_code;โ hands you the ISO 3166 country code from the location object. ๐$code3 = $record->country_code3;โ hands you the ISO 3166 3 letter country code from the location object. โจ$name = $record->country_name;โ hands you the country name from the location object. ๐ณ๏ธ$region = $record->region;โ hands you the region code from the location object. ๐บ๏ธ$region = $record->region_name;โ hands you the region name from the location object. ๐$city = $record->city;โ hands you the city from the location object. ๐๏ธ$postal_code = $record->postal_code;โ hands you the postal code from the location object. ๐ฎ$lat = $record->latitude;โ hands you the approximate latitude of the location tied to that IP address. โ ๏ธ and bestie listen โ this value is not precise and it should not be used to identify a particular address or household. like, do not do that. ๐$lon = $record->longitude;โ hands you the approximate longitude of the location tied to that IP address. โ ๏ธ same warning, same energy: this value is not precise and it should not be used to identify a particular address or household. ๐$time_zone = $record->time_zone;โ hands you the time zone from the location object. ๐$area_code = $record->area_code;โ hands you the area code from the location object โ and heads up, this one's for city-level US locations only. ๐บ๐ธ$metro_code = $record->metro_code;โ hands you the metro code from the location object โ also city-level US locations only. ๐$continent_code = $record->continent_code;โ hands you the continent code from the location object. the possible continent codes areAF,AS,EU,NA,OC,SA, which stand for Africa, Asia, Europe, North America, Oceania and South America. ๐๐๐
โญ VERSION โญ
1.51
๐ซถ AUTHOR ๐ซถ
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. ๐
okay that's the whole page!! this was rendered with perl v5.42.3 on 2026-08-19, and it's the Geo::IP::Record(3pm) situation, mwah ๐ go get those coordinates bestie, but remember โ approximate only, no doxxing, periodt. โจ๐ฆ๐
๐ฆ where this page comes from
- ubuntu stonking: libgeo-ip-perl 1.51-4build5 ยท Artistic-1.0-Perl OR GPL-1.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms