import constant {
#countrydb_url => 'http://www.maxmind.com/download/geoip/database/GeoIPCountryCSV.zip',
#FIXME: This needs a date generator!
- countrydb_url => "http://www.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_${date}.zip",
+ #countrydb_url => "http://www.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity_latest.zip",
+ countrydb_url => "http://geolite.maxmind.com/download/geoip/database/GeoLiteCity_CSV/GeoLiteCity-latest.zip",
srcname => "GeoLiteCity_${date}.zip",
};
}
use File::stat;
if($stat = stat($srcPath)) {
print "Checking for updated country data...\n";
- my $header = qx "wget --spider -S @{[countrydb_url]} 2>&1";
+ my $header = qx "wget --spider -S @{[countrydb_url]} -O @{[srcname]} 2>&1";
($date) = ($header =~ /Last-Modified: (.*)/);
($size) = ($header =~ /Content-Length: (.*)/);
}