By Gast (nicht überprüft), 13 Juli, 2017 Mit GEOIP Ländercode von URL(Host) bekommen $link = "http://www.itlantik.de/node/add/article?uuid=02516"; if( function_exists('geoip_country_code_by_name') ) { $geoip_host = geoip_country_code_by_name( parse_url($link, PHP_URL_HOST) ); echo $geoip_host; # DE }
By Gast (nicht überprüft), 18 Juni, 2017 PHP Warning: geoip_org_by_name(): Required database not available at /usr/share/GeoIP/GeoIPOrg.dat Ich bekomme diesen Fehler: PHP Warning: geoip_org_by_name(): Required database not available at /usr/share/GeoIP/GeoIPOrg.dat Mein PHP-Script: <?php
By Gast (nicht überprüft), 16 Juni, 2017 GEOIP (PHP-PECL) auf Debian Server installieren Damit man GEOIP-PECL auf Debian zum laufen bringt: apt-get install geoip-bin geoip-database libgeoip-dev pecl install geoip Eintrag in php.ini: extension=geoip.so Danach Apache neu starten oder Konfigurationsdatei neu laden. <?php echo geoip_country_code_by_name ( $ip ); // Ausgabe sollte zweistellige Ländercode wie DE oder ähnliches sein. ?>