Author Topic: UPDATED: Script to Display US and Territories Radar Using HAniS  (Read 31359 times)

0 Members and 1 Guest are viewing this topic.

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #75 on: September 15, 2015, 07:29:53 PM »
Works here (before and after this update)..

Thanks, Jerry.
At least I'm batting .500 :-)
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #76 on: September 15, 2015, 08:49:29 PM »
At least I'm batting .500 :-)
Such a deal...  :grin:
John
W7JKG

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #77 on: November 29, 2015, 05:17:18 AM »
Hi Jerry,

Thanks for providing this script.

I am having a problem running in 'stand-alone' mode when the script is called, it will not load the radar site specified in the $radarLoc = parameter. It defaults to Birmingham. Modifying other parameters such as $autoRefreshOff will change the mode.

I've set the php parameter, 'allow_url_fopen' to 'on'.

Any suggestions would be appreciated.
Randy Whitney
W7RSW


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #78 on: November 29, 2015, 10:29:26 AM »
Hi Jerry,

Thanks for providing this script.

I am having a problem running in 'stand-alone' mode when the script is called, it will not load the radar site specified in the $radarLoc = parameter. It defaults to Birmingham. Modifying other parameters such as $autoRefreshOff will change the mode.

I've set the php parameter, 'allow_url_fopen' to 'on'.

Any suggestions would be appreciated.
Unfortunately you've entered somewhat untested waters.  Although a URL would have been helpful I can see your 'wxusradars-hanis3.php', but due to a bug in my code-order I can't view the source. (My bad!)

The version 3 you're using had been replaced by version 3b, which still contained a self-downloader bug due to code placement/order.  Version 3c dated today is now up on my site with a new stand-alone version as well.  (You don't need to rename 'wxusradars-hanis3.php' to 'wxusradars-hanis3-SA.php' in order for the stand-alone capability to function.  I've done so for demonstration purposes.)

Only the main script needed modification and not the supporting 'includes' and 'iframe' scripts.

While you can set the 'fallover defaults' in the two support scripts to your local radar, the only '$radarLoc' that needs to point to your local radar is the one in the main script, 'wxusradars-hanis3.php'.  If you set '$radarLoc' to your local radar only in a supporting script and not the main script you will not see your desired local radar.  All of the defaults in the supporting scripts exist solely to allow debugging and they are not used when these scripts are called by 'wxusradars-hanis3.php'.

I hope this helps, but if not post a link to your 'wxusradars-hanis3.php' so I can look at the code.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #79 on: November 29, 2015, 12:12:12 PM »
Thanks for your quick response Jerry. I've replaced the existing version of 'wxusradars-hanis3.php' with the version you have posted. I'm still having the same problem. I'm thinking it's because of the include calls for the Carterlake or Saratoga scripts that might be causing a problem.

At any rate, I'm running the script at the following: http://whitsweb.com/wxusradars-hanis3-sa.php

I'd appreciate any suggestions.

Randy
Randy Whitney
W7RSW


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #80 on: November 29, 2015, 12:39:18 PM »
Thanks for your quick response Jerry. I've replaced the existing version of 'wxusradars-hanis3.php' with the version you have posted. I'm still having the same problem. I'm thinking it's because of the include calls for the Carterlake or Saratoga scripts that might be causing a problem.

At any rate, I'm running the script at the following: http://whitsweb.com/wxusradars-hanis3-sa.php

I'd appreciate any suggestions.

Randy
You are still showing 'Version 3' and '?sce=view' doesn't display the source.  Are you sure you've uploaded the script to your web site?

(BTW, all of the Saratoga calls are bypassed in 'Stand-Alone'.)

Additionally, I think you need to save the source of the 'includes' and 'iframe' I linked to above and also upload those to your web site.
« Last Edit: November 29, 2015, 12:42:22 PM by gwwilk »
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #81 on: November 29, 2015, 01:02:07 PM »
Hmm...Using http://whitsweb.com/wxusradars-hanis3-sa.php brings up the page with the script but it's defaulted to Birmingham instead of the parameter set. Appending ?sce=view' displays the text of the script.

I've uploaded all the files from your original distro except for the text file to my server.

Thanks for your time Jerry.
Randy Whitney
W7RSW


Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #82 on: November 29, 2015, 01:23:30 PM »
Jerry,

Just to clarify, I've downloaded what I presume is your latest distro, wxusradars-hanis3c3-20150825.zip.

By the way, in inc-wxusradars-hanis3.php on line 102, it appears there is an error:

<option value="srx"<?php echo (($radarLoc=="srk")?' selected="selected"':'')?>>W. Ark./

Randy Whitney
W7RSW


Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #83 on: November 29, 2015, 01:25:53 PM »
You seem to have specified an invalid radar site:  $radarLoc = 'cix';.  perhaps you mean to use this: $radarLoc = 'mxx';?  That is the Eastern Alabama NEXRAD site.

Offline tmabell

  • Forecaster
  • *****
  • Posts: 394
    • Mishawaka Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #84 on: November 29, 2015, 01:30:55 PM »
Update, I think it is your intention to use the Cedar City, UT site?  If so then use this id: ICX.  Simple typo it would appear  :-)
« Last Edit: November 29, 2015, 01:36:41 PM by tmabell »

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #85 on: November 29, 2015, 01:38:04 PM »
Jerry,

Just to clarify, I've downloaded what I presume is your latest distro, wxusradars-hanis3c3-20150825.zip.

By the way, in inc-wxusradars-hanis3.php on line 102, it appears there is an error:

<option value="srx"<?php echo (($radarLoc=="srk")?' selected="selected"':'')?>>W. Ark./
Right you are!  The string should be 'srx' in both locations.  Corrected version on my site.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #86 on: November 29, 2015, 01:38:35 PM »
Hmm...Using http://whitsweb.com/wxusradars-hanis3-sa.php brings up the page with the script but it's defaulted to Birmingham instead of the parameter set. Appending ?sce=view' displays the text of the script.

I've uploaded all the files from your original distro except for the text file to my server.

Thanks for your time Jerry.
Randy, I'm asking you to REPLACE any prior files on your server with those you SAVE ('R-Click', select 'Save as...', and save without the '.txt') with the 'wxusradars-hanis3.php' and the 'includes' and 'iframe' links above.

I no longer issue distributions for HAniS-based scripts.  I will inform you when changes are made, but you need to save the scripts themselves using the links to my site.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #87 on: November 29, 2015, 02:17:19 PM »
Success Jerry, thanks for your help.

I replaced the files downloaded in the ZIP distros with individual files from your site, everything works fine now.

Curiously, when editing then saving wxusradars-hanis3-sa.php in Dreamweaver, changing $radarLoc to icx resulted in $radarLoc = 'cix'.

Editing with Notepad++ from the file directly from the file downloaded off the server resulted in a correct parameter.

At any rate, I'm very pleased with this script you've provided and the help you've given in helping to get it to work, Thanks!
Randy Whitney
W7RSW


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #88 on: November 29, 2015, 02:53:41 PM »
We still have work to do, Randy.  Your 'Stand-Alone' version isn't showing the layers that contain the Legend, Warnings, and Radar.  It's only showing the last images which are 'hard-coded' into the script.  I see via 'phptest.php' you have 'allow_url_fopen = on' in your 'php.ini', so that shouldn't be the problem.

For some reason you didn't upload the latest version of 'wxusradar-hanis-iframe3.php' because your old version is still using 'file-get-contents' rather than a new cURL routine to read the directories containing the layers.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #89 on: November 29, 2015, 03:35:17 PM »
Jerry, somehow I wound up with Version 3c3 (20151122) of wxusradar-hanis-iframe3.php rather than the Version 3b (20150917) you are pointing to now. Any problems with that?

Also, there seems to be a <title> problem in both of those versions (line 22).   :roll:

Thanks.
John
W7JKG

Offline ValentineWeather

  • Forecaster
  • *****
  • Posts: 6370
    • Valentine Nebraska's Real-Time Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #90 on: November 29, 2015, 03:46:45 PM »
Thanks Jerry fixed it.
Randy

Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #91 on: November 29, 2015, 04:04:04 PM »
Jerry, somehow I wound up with Version 3c3 (20151122) of wxusradar-hanis-iframe3.php rather than the Version 3b (20150917) you are pointing to now. Any problems with that?

Also, there seems to be a <title> problem in both of those versions (line 22).   :roll:

Thanks.
The eagle eye again, John, spotting my code-snitching! #-o Title corrected, and all versions of these scripts on my site, including the '-SA' variant, are now versioned 3d and dated today.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #92 on: November 29, 2015, 05:44:33 PM »
Three 'd' version files posted and lookin' good.

Thanks.
John
W7JKG

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #93 on: November 29, 2015, 07:41:01 PM »
We still have work to do, Randy.  Your 'Stand-Alone' version isn't showing the layers that contain the Legend, Warnings, and Radar.  It's only showing the last images which are 'hard-coded' into the script.  I see via 'phptest.php' you have 'allow_url_fopen = on' in your 'php.ini', so that shouldn't be the problem.

For some reason you didn't upload the latest version of 'wxusradar-hanis-iframe3.php' because your old version is still using 'file-get-contents' rather than a new cURL routine to read the directories containing the layers.

Hi Jerry,

I have Version 3d (20151129) - wxusradar-hanis-iframe3.php on my server which is seemingly showing the layers that contain the Legend, Warnings, and Radar when running the script. Is there a newer version I should be using for added features? http://whitsweb.com/wxusradars-hanis3-sa.php

I did modify my php.ini to set 'allow_url_fopen = on' when I first installed the script and found I had a problem.

Thanks again for your help.
Randy Whitney
W7RSW


Offline gwwilk

  • Southeast Lincoln Weather
  • Forecaster
  • *****
  • Posts: 2578
    • SouthEast Lincoln, NE Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #94 on: November 29, 2015, 07:50:21 PM »
We still have work to do, Randy.  Your 'Stand-Alone' version isn't showing the layers that contain the Legend, Warnings, and Radar.  It's only showing the last images which are 'hard-coded' into the script.  I see via 'phptest.php' you have 'allow_url_fopen = on' in your 'php.ini', so that shouldn't be the problem.

For some reason you didn't upload the latest version of 'wxusradar-hanis-iframe3.php' because your old version is still using 'file-get-contents' rather than a new cURL routine to read the directories containing the layers.

Hi Jerry,

I have Version 3d (20151129) - wxusradar-hanis-iframe3.php on my server which is seemingly showing the layers that contain the Legend, Warnings, and Radar when running the script. Is there a newer version I should be using for added features? http://whitsweb.com/wxusradars-hanis3-sa.php

I did modify my php.ini to set 'allow_url_fopen = on' when I first installed the script and found I had a problem.

Thanks again for your help.
All looks good on your website. ☺I think you're done.
Regards, Jerry Wilkins
gwwilk@gmail.com

Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #95 on: November 29, 2015, 08:20:38 PM »
Minor picky-picky, Randy. Yours is not showing the current radar site status info. It's normally located right under the buttons at the top. See http://tiggrweather.net/wxusradars-hanis3.php (I have modified the status display from what Jerry authored).
John
W7JKG

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #96 on: November 29, 2015, 10:21:51 PM »
Minor picky-picky, Randy. Yours is not showing the current radar site status info. It's normally located right under the buttons at the top. See http://tiggrweather.net/wxusradars-hanis3.php (I have modified the status display from what Jerry authored).

Hi John,

I see you have the current radar status displayed. Would you care to share what modifications you've made to enable the display of the radar status? It seems that the 'radar-status-getradar.php' script should be doing the job, but I can't get it to work.

Could it be a problem I'm running stand alone rather than using the template?

Any help would be appreciated.
Randy Whitney
W7RSW


Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #97 on: November 30, 2015, 02:09:55 AM »
Hi Randy,

Looking at the code I don't see where running standalone would disallow the radar status to run. The call to that script is in place and you have it uploaded to your server. Is Denver your correct time zone (but that would not stop the script from running)?

I don't see what's wrong, but Jerry is the expert here as to should it work with the SA script.

Sorry.
John
W7JKG

Offline W7RSW

  • Member
  • *
  • Posts: 15
    • WhitsWeb Weather
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #98 on: November 30, 2015, 09:35:01 AM »

Looking at the code I don't see where running standalone would disallow the radar status to run. The call to that script is in place and you have it uploaded to your server. Is Denver your correct time zone (but that would not stop the script from running)?

I don't see what's wrong, but Jerry is the expert here as to should it work with the SA script.

Sorry.

I did get the script where it does display the radar status now John, it's now just a matter of getting the proper settings in the style sheet to display it as I'd like.

Thanks
Randy Whitney
W7RSW


Offline jgillett

  • Forecaster
  • *****
  • Posts: 1187
  • Boltek, Win7 Pro, ToA
    • TiggrWeather Phoenix
Re: UPDATED: Script to Display US and Territories Radar Using HAniS
« Reply #99 on: November 30, 2015, 11:44:23 AM »
Glad you got it running and sorry I wasn't able to help.
John
W7JKG