ipinfo.cgi: Use new location lookup method.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
Stefan Schantl
2019-12-05 17:17:42 +01:00
parent 8a64d10f24
commit 13c0fb7910

View File

@@ -52,7 +52,8 @@ if (&General::validip($addr)) {
if (!$hostname) { $hostname = $Lang::tr{'lookup failed'}; }
# enumerate GeoIP information for IP address...
my $ccode = &GeoIP::lookup($addr);
my $db_handle = &GeoIP::init();
my $ccode = &GeoIP::lookup_country_code($db_handle, $addr);
my $flag_icon = &GeoIP::get_flag_icon($ccode);
my $sock = new IO::Socket::INET ( PeerAddr => $whoisname, PeerPort => 43, Proto => 'tcp');