cloudy

Author Topic: Volcano Conditions PHP Script  (Read 8003 times)

0 Members and 1 Guest are viewing this topic.

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Volcano Conditions PHP Script
« on: June 15, 2009, 12:14:03 AM »
Volcano Conditions PHP Script by Mike Challis

Version: 1.03 - 11-Sep-2010 - new data URL's to fix missing data

Displays the U.S. Geological Survey's daily/weekly current conditions and observations for the given volcano. Also displays a web cam image.

Includes scripts for the following volcanoes:
Alaska - Mt Redoubt
Hawaii - Kilauea
Washington - Mt Saint Helens

If anybody adds another volcano, please share.

Download:        
http://www.642weather.com/weather/scripts/wxvolcano.zip

Live Demos:    
http://www.642weather.com/weather/volcano-ak.php  
http://www.642weather.com/weather/volcano.php
« Last Edit: September 11, 2010, 02:39:48 PM by MCHALLIS »

Offline ALITTLEweird1

  • Mark
  • Posts: 3,878
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Volcano Conditions PHP Script
« Reply #1 on: June 15, 2009, 12:36:15 AM »
Nice script Mike. Would it be hard to Add Mt Rainer?
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Volcano Conditions PHP Script
« Reply #2 on: June 15, 2009, 12:47:49 AM »
Nice script Mike. Would it be hard to Add Mt Rainer?

The Washington script actually includes all the volcanoes in the Cascade Range.
These include Mount Baker, Glacier Peak, Mount Rainier, Mount St. Helens, and Mount Adams in Washington State; Mount Hood, Mount Jefferson, Three Sisters, Newberry Volcano, and Crater Lake, in Oregon; and Medicine Lake volcano, Mount Shasta, and Lassen Peak in northern California.

All you have to do is copy the script and strip out the Mt St Helens titles and cam image and you can make it a  "Cascade Range Volcanoes" script. Or you can find a web cam for any one of those volcanoes to make it into an individualized script.

Offline ALITTLEweird1

  • Mark
  • Posts: 3,878
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Volcano Conditions PHP Script
« Reply #3 on: June 15, 2009, 01:48:16 AM »
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Offline arthurhh

  • Tokoroa Weather Live
  • Posts: 369
  • IT Fixer
  • Tokoroa South Waikato New Zealand
    • Tokoroa Weather Live
Re: Volcano Conditions PHP Script
« Reply #4 on: June 15, 2009, 04:03:16 AM »
Just what I need to encourage me to improve on my current Volcano page which has gone no where since I first thought of the idea. I will have to do some big cut/paste/hacks on the script to get it to take our local reports for the variuos Volcanos in NZ

Offline TokKiwi

  • Techno Dad
  • Posts: 4,282
  • Mech Engineer and Hobbyist
  • Tokoroa, Sth Waikato, New Zealand
    • Tokoroa North Weather
Re: Volcano Conditions PHP Script
« Reply #5 on: June 15, 2009, 10:58:34 AM »
And he's done well - it looks great - a one stop shop!  I'll let Arthur post the link... :)  Well done Mike!
Dad's have hobbies because they are children's rugby, football and Committee Fathers!!

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Volcano Conditions PHP Script
« Reply #6 on: June 15, 2009, 02:33:52 PM »
Looks great  :D

Since you are gleaning content from another site, don't forget attribution.
http://www.642weather.com/weather/volcano.php

I put a source link to where I got the info:

Source: Cascade Range Current Update  

Also credit and a few links:

Volcano image courtesy of ...
Mount St. Helens National Volcanic Monument

Information courtesy of ...
U.S. Geological Survey, Vancouver, Washington
University of Washington, Pacific Northwest Seismograph Network, Seattle, Washington

« Last Edit: June 15, 2009, 02:36:14 PM by MCHALLIS »

Offline ALITTLEweird1

  • Mark
  • Posts: 3,878
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Volcano Conditions PHP Script
« Reply #7 on: June 15, 2009, 03:07:00 PM »
Idea: Add what the Aviation Color Codes and Alert Levels mean..

http://www.avo.alaska.edu/color_codes.php


« Last Edit: June 15, 2009, 03:09:06 PM by ALITTLEweird1 »
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Offline Silversword

  • --Stan Y.
  • Posts: 775
  • Maui, Hawaii
    • Up Country Maui Weather
Re: Volcano Conditions PHP Script
« Reply #8 on: June 16, 2009, 04:25:57 AM »
Hi Mike,

I would like to know where does "volcano-current-xx.txt" file is coming or generated from? I would like to try my hand with this script for the "Big Island" of Hawaii. As this area has been quite active for nearly the past 30 years or so.

I will be in California this week and will try to work with it the week after I get back.

Thank you for all the work that you have provided.

--Stan Y.
  Maui, Hawaii
WD 10.37r Bld 00
WDL 6.05

Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Webcam: Panasonic BL-C1A

Offline MCHALLIS

  • Posts: 2,102
  • Long Beach, WA USA
    • Weather for Long Beach, WA USA
Re: Volcano Conditions PHP Script
« Reply #9 on: June 16, 2009, 05:10:41 AM »
volcano-current-xx.txt is a text file the script makes to cache a local copy of the volcano page where the data is copied from. The page is cached for 1/2 hour to lighten the load on the servers where you get the data so they might not complain about bandwidth usage.
« Last Edit: June 16, 2009, 06:29:24 PM by MCHALLIS »

Offline arthurhh

  • Tokoroa Weather Live
  • Posts: 369
  • IT Fixer
  • Tokoroa South Waikato New Zealand
    • Tokoroa Weather Live
Re: Volcano Conditions PHP Script
« Reply #10 on: June 16, 2009, 05:51:36 AM »
And he's done well - it looks great - a one stop shop!  I'll let Arthur post the link... :)  Well done Mike!

Picked over Mikes Ideas but had to do my own thing as the scripts just didnt want to know about the sources availabe to us.

I have to do a lot of tidy up yet, and cache the RSS and images. But that will take time

http://tokoroa.dyndns.org/e-volcanoes.php

Offline Silversword

  • --Stan Y.
  • Posts: 775
  • Maui, Hawaii
    • Up Country Maui Weather
Re: Volcano Conditions PHP Script
« Reply #11 on: June 16, 2009, 01:47:54 PM »
volcano-current-xx.txt is a text file the script uses to cache a local copy of the volcano page where the data is copied from. The page is cached for 1/2 hour to lighten the load on the servers where you get the data so they might not complain about bandwidth usage.

Thanks Mike for the info and will give it a shot next week when I get back.  I assume that the script will generate this text file.

Aloha,

--Stan Y.
   Maui, Hawaii
WD 10.37r Bld 00
WDL 6.05

Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Webcam: Panasonic BL-C1A

Offline Silversword

  • --Stan Y.
  • Posts: 775
  • Maui, Hawaii
    • Up Country Maui Weather
Re: Volcano Conditions PHP Script
« Reply #12 on: June 29, 2009, 07:01:58 AM »
Hi Mike,

Started to work on this volcano script for Kilauea Volcano on the Big Island.  I got the webcam portion working okay at the moment but the current activity portion will not work at the moment for some reason. Attached is the template that I am working on at the moment.  URL is www.dwayneyamato.com/wx/wxvolcano-hi.php

When your time permits, what do I need to change?

Thank you for all of your support.

--Stan Y.
   Maui, Hawaii
WD 10.37r Bld 00
WDL 6.05

Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Webcam: Panasonic BL-C1A

Offline ALITTLEweird1

  • Mark
  • Posts: 3,878
  • Snoqualmie,WA
    • Snoqualmie Weather
Re: Volcano Conditions PHP Script
« Reply #13 on: June 29, 2009, 10:32:57 AM »
create a blank txt file called   volcano-current-hi

Set the permissions to 666
"Nature can do without man, but man cannot do without nature."

Davis VP2 + 1-Wire Solar + 1-wire Lightning + 1-Wire UV + Logitech Webcam

Offline Silversword

  • --Stan Y.
  • Posts: 775
  • Maui, Hawaii
    • Up Country Maui Weather
Re: Volcano Conditions PHP Script
« Reply #14 on: June 29, 2009, 03:14:54 PM »
create a blank txt file called   volcano-current-hi

Set the permissions to 666

Hi,

Okay, I did this and still no joy at the moment.  Will work on this later tonight and see what happens with other suggestions.

Thank you for your suggestion.

--Stan Y.
   Maui, Hawaii
WD 10.37r Bld 00
WDL 6.05

Dell Optiplex GX280-Intel Pentium 4 CPU 3.00GHz, 4 GB RAM
Webcam: Panasonic BL-C1A

 

cumulus