Thread ISP-IP-Datenbank gesucht (38 answers)
Opened by Gustl at 2011-09-17 20:06

GwenDragon
 2011-09-23 09:16
#152608 #152608
User since
2005-01-17
14748 Artikel
Admin1
[Homepage]
user image
Wieso verwendest du denn nicht GeoIPCity.dat?
Bei mir kklapp es mit gut über Geo::IP.

Test mal das auf der Shell (Pfad zur GeoIPCity anpassen!):

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/usr/bin/perl

use strict;
use warnings;

use Geo::IP;

my $gi = Geo::IP->open("/usr/share/GeoIP/GeoIPCity.dat", GEOIP_STANDARD);
my $ip = shift;
my $record = $gi->record_by_addr($ip);
 print join "\n",
        $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;


View full thread ISP-IP-Datenbank gesucht