[or-cvs] r17699: {torstatus} (ticket:123) Changing GeoIP database location (in torstatus/trunk: . web)

kasimir at seul.org kasimir at seul.org
Fri Dec 19 17:11:37 UTC 2008


Author: kasimir
Date: 2008-12-19 12:11:37 -0500 (Fri, 19 Dec 2008)
New Revision: 17699

Modified:
   torstatus/trunk/tns_update.pl
   torstatus/trunk/web/config_template.php
   torstatus/trunk/web/index.php
Log:
(ticket:123) Changing GeoIP database location

Modified: torstatus/trunk/tns_update.pl
===================================================================
--- torstatus/trunk/tns_update.pl	2008-12-19 07:05:57 UTC (rev 17698)
+++ torstatus/trunk/tns_update.pl	2008-12-19 17:11:37 UTC (rev 17699)
@@ -147,7 +147,7 @@
 	if ($oldmonth != $month && $day > 2) # Give extra time
 	{
 		# The GeoIP database should be updated
-		my $getresponse = getstore('http://www.maxmind.com/download/geoip/database/GeoIP.dat.gz','/tmp/GeoIP.dat.gz');
+		my $getresponse = getstore('http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz','/tmp/GeoIP.dat.gz');
 		unless (is_success($getresponse))
 		{
 			print "Error retrieving GeoIP file.  Please contact Kasimir <kasimir\@kgprog.com>. \n(not dying)\n";

Modified: torstatus/trunk/web/config_template.php
===================================================================
--- torstatus/trunk/web/config_template.php	2008-12-19 07:05:57 UTC (rev 17698)
+++ torstatus/trunk/web/config_template.php	2008-12-19 17:11:37 UTC (rev 17699)
@@ -72,7 +72,7 @@
 // Change this value to 0 if you do not wish to download the mirror list
 $useMirrorList = 1;
 $mirrorListURI = "http://trunk.torstatus.kgprog.com/currentmirrors.php";
-$manualMirrorList = array('allde' => 'https://torstatus.all.de/','blutmagie' => 'https://torstatus.blutmagie.de/','kradense' => 'https://kradense.whsites.net/tns/', 'cyberphunk' => 'http://torstatus.cyberphunk.org/', 'hermetix' => 'http://tns.hermetix.org/', 'kgprog' => 'https://torstatus.kgprog.com/', 'recoxdotorg' => 'http://tor.recox.org/', 'amorphis' => 'http://torstatus.amorphis.eu/');
+$manualMirrorList = array('blutmagie' => 'https://torstatus.blutmagie.de/','Kradense' => 'https://kradense.whsites.net/tns/', 'cyberphunk' => 'http://torstatus.cyberphunk.org/', 'hermetix' => 'http://tns.hermetix.org/', 'kgprog' => 'https://torstatus.kgprog.com/', 'amorphis' => 'http://torstatus.amorphis.eu/', 'Tylers' => 'http://torstat.kleine-eismaus.de/');
 
 // }}}
 

Modified: torstatus/trunk/web/index.php
===================================================================
--- torstatus/trunk/web/index.php	2008-12-19 07:05:57 UTC (rev 17698)
+++ torstatus/trunk/web/index.php	2008-12-19 17:11:37 UTC (rev 17699)
@@ -2314,8 +2314,8 @@
 	echo "</td><td class='content'>";
 	echo "<span class='notUsingTor'>You do not appear to be using Tor</span><br/>Your IP Address is: ";
 	// Find the country code associated with this IP
-	include("../geoip/geoip.inc");
-	$gi = geoip_open("../geoip/GeoIP.dat",GEOIP_STANDARD);
+	require_once($TNS_Path . $GEOIP_Path . "geoip.inc");
+	$gi = geoip_open($TNS_Path . $GEOIP_Path . "GeoIP.dat",GEOIP_STANDARD);
 	$cc = geoip_country_code_by_addr($gi, $RemoteIP);
 	echo "<img src=\"img/flags/".strtolower($cc).".gif\" class=\"flag\" title=\"".$country_codes[strtolower($cc)]."\" alt=\"".$country_codes[strtolower($cc)]."\" />";
 	



More information about the tor-commits mailing list