mirror of
https://github.com/WhatCD/Gazelle.git
synced 2025-02-20 20:29:03 +00:00
Empty commit
This commit is contained in:
parent
9725ab2dfa
commit
360020482b
@ -33,6 +33,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (substr($_REQUEST['action'],0,12) == 'update_geoip' && !isset($argv[1])) {
|
||||
if (!check_perms('site_debug')) {
|
||||
error(403);
|
||||
}
|
||||
}
|
||||
|
||||
include(SERVER_ROOT."/classes/class_validate.php");
|
||||
$Val=NEW VALIDATE;
|
||||
|
||||
|
@ -2,16 +2,16 @@
|
||||
ini_set('memory_limit', -1);
|
||||
set_time_limit(0);
|
||||
|
||||
if (!check_perms('site_debug')) { error(403); }
|
||||
//if (!check_perms('site_debug')) { error(403); }
|
||||
|
||||
show_header();
|
||||
|
||||
//requires wget, unzip commands to be installed
|
||||
shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'02.zip');
|
||||
shell_exec('unzip GeoLiteCity_'.date('Ym').'02.zip');
|
||||
shell_exec('rm GeoLiteCity_'.date('Ym').'02.zip');
|
||||
shell_exec('wget http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_'.date('Ym').'06.zip');
|
||||
shell_exec('unzip GeoLiteCity_'.date('Ym').'06.zip');
|
||||
shell_exec('rm GeoLiteCity_'.date('Ym').'06.zip');
|
||||
|
||||
if(($Locations = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
if(($Locations = file("GeoLiteCity_".date('Ym')."06/GeoLiteCity-Location.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
error("Download or extraction of maxmind database failed");
|
||||
}
|
||||
array_shift($Locations);
|
||||
@ -30,7 +30,7 @@
|
||||
echo "There are ".count($CountryIDs)." CountryIDs";
|
||||
echo "<br />";
|
||||
|
||||
if(($Blocks = file("GeoLiteCity_".date('Ym')."02/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
if(($Blocks = file("GeoLiteCity_".date('Ym')."06/GeoLiteCity-Blocks.csv", FILE_IGNORE_NEW_LINES)) === false) {
|
||||
echo "Error";
|
||||
}
|
||||
array_shift($Blocks);
|
||||
|
Loading…
Reference in New Issue
Block a user