You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
432 B
12 lines
432 B
#!/usr/bin/php
|
|
<?php
|
|
require('conf.php');
|
|
|
|
if (!array_key_exists('GeoLite2-LicenseKey', $config)) {
|
|
print "No LicenseKey for MaxMind GeoLite2 database set. Not downloading database.";
|
|
exit(0);
|
|
}
|
|
|
|
@mkdir("data/GeoIP");
|
|
chdir("data/GeoIP");
|
|
system("wget -O- 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-City&license_key={$config['GeoLite2-LicenseKey']}&suffix=tar.gz' | tar --strip-components=1 -xvzf -");
|