Author Topic: wxnwsradar.php  (Read 1751 times)

0 Members and 1 Guest are viewing this topic.

Offline jjmcnelly1

  • Member
  • *
  • Posts: 2
    • Dillenbaugh Weaher
wxnwsradar.php
« on: December 25, 2020, 03:05:48 PM »
The radar images are not available.

http://chehalisweather.com/wxnwsradar.php

I updated the USA-regional-maps-inc.php to the latest version dated Dec 17. 

Any ideas?
Thx
James McNelly

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxnwsradar.php
« Reply #1 on: December 25, 2020, 03:25:09 PM »
That script will not work anymore because they made changes in radar.weather.gov. You should just comment it out in your menu — the script will not work again.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline jjmcnelly1

  • Member
  • *
  • Posts: 2
    • Dillenbaugh Weaher
Re: wxnwsradar.php
« Reply #2 on: December 25, 2020, 05:49:31 PM »
Okay. Thanks. Bummer. I'll do that then.

Merry Christmas

Offline racenet

  • Forecaster
  • *****
  • Posts: 1306
    • NH Weather Data
Re: wxnwsradar.php
« Reply #3 on: May 01, 2021, 07:45:34 PM »
With the new update for this out, how would one make it so that the CONUS and regional radars can be viewed from here also? I tried digging into the script and tried several different things, with no success.

I know it has to be something stupid simple I'm missing.


Bob
www.theamericanflagstore.com - The American Flag Store



www.nhweatherdata.com - NH Weather Data

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxnwsradar.php
« Reply #4 on: May 01, 2021, 09:09:30 PM »
No problem, Bob.. I'd just omitted the composites from the allowable list to display.

Try the attached replacement V2.01 scripts .. It adds a Composite list at the top of the selector list.

It's working on https://cumulusmx.saratoga-weather.org/wxnwsradar.php
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline racenet

  • Forecaster
  • *****
  • Posts: 1306
    • NH Weather Data
Re: wxnwsradar.php
« Reply #5 on: May 01, 2021, 11:34:24 PM »
Thanks Ken! Working fantastic.

I looked at the updated code and see where you added the composite items. I was adding them there, but was not calling them correctly. That's why it wasn't working for me.

 [tup]
www.theamericanflagstore.com - The American Flag Store



www.nhweatherdata.com - NH Weather Data

Offline Silversword

  • --Stan Y.
  • Forecaster
  • *****
  • Posts: 558
    • Up Country Maui Weather
Re: wxnwsradar.php
« Reply #6 on: May 04, 2021, 04:07:27 PM »
Hi Ken,

I updated my wxnwsradar and noticed the the "Radar Type" is showing just the Base Reflectivity an no Composite on the pull down menu.

Just an observation.

Aloha,

--Stan Y.
   Maui, Hawaii
 
Stan Y. - KH6HHG - Maui, Hawaii
 --- Blitzortung ID: 993
 --- FlightRadar24 ID: F-PHOG1

WDL 6.05
MS Windows 7 Pro
Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Davis Vantage Pro 2+ Wireless
Webcam: Axis 211

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: wxnwsradar.php
« Reply #7 on: May 05, 2021, 06:19:29 AM »
Hi Ken,

I updated my wxnwsradar and noticed the the "Radar Type" is showing just the Base Reflectivity an no Composite on the pull down menu.

Just an observation.

Aloha,

--Stan Y.
   Maui, Hawaii
Very astute, Stan!  Ken decided to leave the 'Radar Type' selector in place in order to illustrate how meager the NWS's current publicly accessible Ridge Radar offerings really are.  I concurred with his decision.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: wxnwsradar.php
« Reply #8 on: May 25, 2021, 03:04:40 PM »
My page is throwing this error,

Parse error: syntax error, unexpected 'OFF' (T_STRING) in /home/goblesweather/www/www/wxnwsradar.php on line 73

Here is the line it is referring to.

Code: [Select]
$autoRefreshOff = true; // Begin with Autorefresh Off? true or false -- 'OFF' or 'ON"
Here is my page.

https://www.goblesweather.com/wxnwsradar.php

Chuck
« Last Edit: May 25, 2021, 03:07:56 PM by andro700 »

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxnwsradar.php
« Reply #9 on: May 25, 2021, 03:50:19 PM »
Since it is a syntax error, you'll need to copy the file, rename it to .txt and post it here so we can have a look at it.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: wxnwsradar.php
« Reply #10 on: May 25, 2021, 08:59:37 PM »
It is from the Base Saratoga Script.  I know I am running PHP 7.4 on my web host.

Chuck


Sent from my iPhone using Tapatalk

Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxnwsradar.php
« Reply #11 on: May 25, 2021, 09:31:51 PM »
Hmmm... it's not failing on my copy and I run PHP 7.4 also; that's why I asked that you make a copy of your wxnwsradar.php, change the extension to .txt and post so we can see.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: wxnwsradar.php
« Reply #12 on: May 25, 2021, 09:35:35 PM »
Gotcha! Will post it  in the morning. Currently at work.

Chuck


Sent from my iPhone using Tapatalk

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: wxnwsradar.php
« Reply #13 on: May 26, 2021, 12:01:03 PM »
Here is the text version.

Code: [Select]
?php
############################################################################
# A Project of TNET Services, Inc. and Saratoga-Weather.org (WD-USA template set)
############################################################################
#
#   Project:    Sample Included Website Design
#   Module:     sample.php
#   Purpose:    Sample Page
#   Authors:    Kevin W. Reed <kreed@tnet.com>
#               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
############################################################################
#
# this script is a port of Jerry Wilkins wxusradars-hanis3.php Version 5a (20190511)
# with additional mods by Ken True for inclusion in the Saratoga Base-USA template.
# Many thanks to Jerry for allowing the kind use of his code!
#
# Version 1.00 - 22-May-2020 - initial release
# Version 2.00 - 06-Jan-2021 - reworked to use NWS-regional-radar-animate.php images instead.
# Version 2.01 - 06-Apr-2021 - update to use radar.weather.gov/ridge/lite images
############################################################################
$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
require_once("Settings.php");
require_once("common.php");
############################################################################
$divWidth = 660;
$TITLE = langtransstr($SITE['organ']) . " - " .langtransstr('US and Territories Current NOAA Ridge Radar');
$showGizmo = true; // Set to false to exclude the gizmo
include("top.php");
############################################################################
/************************* Settings *****************************/
$radarLoc = 'ATX; // IMPORTANT!!! Default radar location is set here
// NOTE: use last 3 characters for Kxxx sites,
// use ALL 4 characters for Pxxx/Txxx sites (AK, HI, Guam, Puerto Rico)
$imageWidth = 600; // Width of radar images
$iframeWidth = 617; // Default IFrame Width -- adjust as needed
$iframeHeight = 620; // Default IFrame Height -- adjust as needed
$autoRefresh = true; // Use Autorefresh? true or false -- Determines whether AutoRefresh even appears
$autoRefreshTime = 8; // Number of minutes between autorefreshes.  IMPORTANT: use 2, 3, 4, 5, 6, 8, 10, 15, 20, or 30 ONLY!!!
$autoRefreshOff = true; // Begin with Autorefresh Off? true or false -- 'OFF' or 'ON"
$bgndColor = 'silver'; // Set HAniS Background Color Here
$btnColor = 'darkslategray'; // Set Button Color here
$btnTextColor = 'white'; // Set Button Text Color here
############################ New in Version 2 ##########################
$pauseSeconds = 2; // Pause on last image, in seconds
$animRate = 20; // Frame Rate of animation: 5 is glacial, 10 is slow, 15 is leisurely, 20 is good, and 50 is fast - set with integer
$numbImages = 10; // Number of Radar Images to Animate - 3 to 10
############################ New in Version 3 ##########################
$smoothingOn = true; // Enable image smoothing - new in HAniS 2.5
/*********************** End Settings ***************************/
if(isset($SITE['noaaradar'])) { $radarLoc = strtolower($SITE['noaaradar']);}
$radar = 'N0R'; //  'N0R' is the only type available at /ridge/lite/

?>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript"> {
var $jq = jQuery.noConflict();
function showRadarjs(radar,radarLoc,imageWidth,iframeWidth,iframeHeight,autoRefresh,autoRefreshTime,bgndColor,autoRefreshOff,btnColor,btnTextColor,pauseSeconds,animRate,numbImages,smoothingOn) {
$jq('#selectorsarea').load('wxnwsradar-inc.php', {radar:radar,radarLoc:radarLoc,imageWidth:imageWidth,iframeWidth:iframeWidth,iframeHeight:iframeHeight,autoRefresh:autoRefresh,autoRefreshTime:autoRefreshTime,bgndColor:bgndColor,autoRefreshOff:autoRefreshOff,btnColor:btnColor,btnTextColor:btnTextColor,pauseSeconds:pauseSeconds,animRate:animRate,numbImages:numbImages,smoothingOn:smoothingOn});
}
}
</script>
<style type="text/css">
#selectorsarea optgroup {
  color: black;
  background: white;
}
#selectorsarea option {
  background-color:<?php echo $btnColor?>;
  border-radius:7px;
  color:<?php echo $btnTextColor?>;
}
#selectorsarea select {
  background-color:<?php echo $btnColor?>;
  border-radius:7px;
  color:<?php echo $btnTextColor?>;
}
</style>
</head>
<body>
<?php
############################################################################
include("header.php");
include(
"menubar.php");
############################################################################
?>


<div id="main-copy">
  <div align="center">
  <h2 align="center">US and Territories Current NOAA Ridge Radar</h2>
    <?php include_once('wxnwsradar-inc.php');?>
  </div><!-- end align=center -->
</div><!-- end main-copy -->

<?php 
############################################################################
include("footer.php");
############################################################################
# End of Page
############################################################################
?>


Online saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: wxnwsradar.php
« Reply #14 on: May 26, 2021, 12:59:35 PM »
The issue is
Code: [Select]
$radarLoc = 'ATX; // IMPORTANT!!! Default radar location is set here is missing a closing ' (single-quote).
It should read
Code: [Select]
$radarLoc = 'ATX'; // IMPORTANT!!! Default radar location is set here
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline andro700

  • Chuck
  • Forecaster
  • *****
  • Posts: 420
    • Gobles Weather Page
Re: wxnwsradar.php
« Reply #15 on: May 26, 2021, 02:07:04 PM »
Holy crap. I should have seen that. Thanks Ken.


Sent from my iPhone using Tapatalk