|
Welcome to GRASS GIS
You are at an official GRASS site (other mirror sites) ";
} else {
if (preg_match("/Internal Server Error/i", $file_contents)) {
echo "You are at an official GRASS site (other mirror sites) ";
} else {
// e.g.: "Country: UNITED STATES (US) City: San Diego, CA"
$MYSTATETMP = explode(":", $file_contents);
$MYSTATETMP2 = explode(")", $MYSTATETMP[1]);
$MYSTATE = $MYSTATETMP2[0] . ")";
if ($MYIP == "140.211.15.75") {
echo "You are at the official GRASS site in $MYSTATE
(mirror sites) ";
} else {
echo "You are at a GRASS mirror site in $MYSTATE (other mirror sites) ";
}
}
}
} 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) {
echo "You are at an official GRASS site (other
mirror sites) ";
} else {
$line = fgets ($file, 34);
$MYSTATETMP = explode(":", $line);
$MYSTATE = $MYSTATETMP[1];
if ($MYIP == "140.211.15.75") {
echo "You are at the official GRASS site in $MYSTATE
(mirror sites) ";
} else {
echo "You are at a GRASS mirror site in $MYSTATE (other mirror sites) ";
}
fclose($file);
}
} else {
echo "You are at a GRASS mirror site
(other mirror sites) ";
}
}
?>
This site is updated daily: LASTUPDATED
|
|
|