[GRASS-SVN] r30328 - grass-web/trunk

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Feb 24 12:49:32 EST 2008


Author: neteler
Date: 2008-02-24 12:49:32 -0500 (Sun, 24 Feb 2008)
New Revision: 30328

Modified:
   grass-web/trunk/index.php
Log:
work around mirror.aarnet.edu.au PHP mess

Modified: grass-web/trunk/index.php
===================================================================
--- grass-web/trunk/index.php	2008-02-24 17:30:36 UTC (rev 30327)
+++ grass-web/trunk/index.php	2008-02-24 17:49:32 UTC (rev 30328)
@@ -38,7 +38,8 @@
 // avoid PHP warning noise
 error_reporting(1);
 
-if (function_exists('curl_init')) {
+if ( $MYIP != "202.158.214.106" ) {
+ if (function_exists('curl_init')) {
   $ch = curl_init();
   $MYIP = $_SERVER['SERVER_ADDR'];
   $timeout = 5; // set to zero for no timeout
@@ -61,7 +62,7 @@
 	echo "<font size=\"-1\"><i>You are at a GRASS mirror site in $MYSTATE (other <a href=\"mirrors.php\">mirror sites</a>)<br>";
       }
   }
-} elseif (function_exists('fopen') && allow_url_fopen ) {
+ } elseif (function_exists('fopen') && allow_url_fopen ) {
      $MYIP = $_SERVER['SERVER_ADDR'];
      $file = fopen ("http://api.hostip.info/get_html.php?ip=$MYIP", "r");
      if (!$file) {
@@ -75,9 +76,10 @@
    	                   <a href=\"mirrors.php\">mirror sites</a>)<br>";
 	 fclose($file);
      }
-} else {
+ } else {
     echo "<font size=\"-1\"><i>You are at a GRASS mirror site
 	   (other <a href=\"mirrors.php\">mirror sites</a>)<br>";
+ }
 }
 ?>
                    This site is updated daily: LASTUPDATED</i> <!-- processed by cron/sed -->



More information about the grass-commit mailing list