# TNET Services, Inc.
#
# Copyright: (c) 1992-2007 Copyright TNET Services, Inc.
############################################################################
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
############################################################################
# This document uses Tab 4 Settings
############################################################################
/***************************** version 20220901 ***************************/
/******* Thanks to Ken True for the updated 'get_data()' function *******/
$viewSource = false;
if (isset($_REQUEST['sce']) && strtolower($_REQUEST['sce']) == 'view' ) {
//--self downloader --
$filenameReal = __FILE__;
$download_size = filesize($filenameReal);
header('Pragma: public');
header('Cache-Control: private');
header('Cache-Control: no-cache, must-revalidate');
header("Content-type: text/plain");
header("Accept-Ranges: bytes");
header("Content-Length: $download_size");
header('Connection: close');
readfile($filenameReal);
exit;
}
############################################################################
$standAlone = false; // false if we run in the template environment
if ( $standAlone ) { ?>
Clickable NWS National Advisory Maps
Maps autoupdate every few minutes. Refresh page (<F5>) to update Legend.
Click on map to open a new tab zoomed to the area of interest where the local legend also decodes the colors and links to
detailed local text alerts. The NWS map which opens is in turn clickable to then display VERY localized conditions and a 7 day forecast.
All Maps and Data Are Courtesy of NOAA/NWS. (Current NWS Alerts Color Code Chart)
Experimental Freeze Alert Status courtesy of MRCC Vegetation Impact Program (VIP).
Full Size Maps';
} ?>
';
}
############################################################################
# End of Page
############################################################################
//------------------------------------------------------------------------------------------
function get_data($url)
{
$ch = curl_init();
$timeout = 5;
curl_setopt($ch, CURLOPT_USERAGENT,'AlertsFetch/1.1 (Web Application, www.gwwilkins.org)');
curl_setopt($ch,CURLOPT_URL,$url);
curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); // don't verify peer certificate
$data = curl_exec($ch);
if (curl_error($ch) <> '') { // IF there is an error
print "\n"; // display error notice
}
curl_close($ch);
return $data;
}
//------------------------------------------------------------------------------------------
?>