Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://pecl.php.net/package/geoip/1.1.1/windows 7.4 Thread Safe (TS) x64
- https://www.miyuru.lk/geoiplegacy
- https://mailfud.org/geoip-legacy/
- $record = geoip_record_by_name('www.example.com');
- if ($record) {
- print_r($record);
- }
- https://github.com/maxmind/geoip-api-php
- require 'geoip-api-php-main/src/geoipcity.inc';
- // uncomment for Shared Memory support
- // geoip_load_shared_mem("/usr/local/share/GeoIP/GeoIPCity.dat");
- // $gi = geoip_open("/usr/local/share/GeoIP/GeoIPCity.dat",GEOIP_SHARED_MEMORY);
- $gi = geoip_open("GeoIPCity.dat", GEOIP_STANDARD);
- $record = GeoIP_record_by_addr($gi, "24.24.24.24");
- print $record->country_code . " " . $record->country_code3 . " " . $record->country_name . "\n";
- print $record->region . " " . $GEOIP_REGION_NAME[$record->country_code][$record->region] . "\n";
- print $record->city . "\n";
- print $record->postal_code . "\n";
- print $record->latitude . "\n";
- print $record->longitude . "\n";
- print $record->metro_code . "\n";
- print $record->area_code . "\n";
- print $record->continent_code . "\n";
- geoip_close($gi);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement