Author Topic: Fire Danger Script  (Read 6088 times)

0 Members and 1 Guest are viewing this topic.

Offline dre

  • Member
  • *
  • Posts: 29
    • Weather by the Bay
Fire Danger Script
« on: January 01, 2008, 09:37:27 PM »
Hi All,

I'm new to weather and this forum.  I'm in the process of setting up my web site,
http://www.weatherbythebay.com
and would like to list the local fire danger.  I've downloaded the fire danger script from SLOweather, which says that it needs a file called stickertags.txt.  I've looked at Anole's web site, but was unable to find out abot it.  Can anyone help me?
Thanks

Offline capeweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 1309
    • http://www.capeweather.com
Re: Fire Danger Script
« Reply #1 on: January 01, 2008, 10:30:26 PM »

Chris
Cape Coral, Florida
Website: http://www.capeweather.com
Website: http://www.fortmyersweather.net

Offline SLOweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 3456
    • Weatherelement Moline IL
Re: Fire Danger Script
« Reply #2 on: January 01, 2008, 10:57:04 PM »
Hi Dre, and welcome to wxforum.

Before you embark on this, make sure that your web server is running PHP. You need it to run the script.

Since I was already using Anole's Weather Graphic script, and his data file has the required weather data in it already, I use that data in the Fire Danger Script.

You appear to be using WeatherLink software.

Anole's weather graphic download page is at http://scripts.anolecomputer.com/download.shtml . It's a PHP script package that creates those spiffy banners like you see at the bottom of a lot of posts here and on other forums.

At the link, you will see a file called wxgraphic_6.1.zip.

Inside that zip file, is a file called WeatherLink_graphictags.htx.

It's a simple text file that looks like this:

<!--stationTime-->,<!--stationDate-->,<!--outsideTemp-->,<!--outsideHeatIndex-->,<!--windChill-->,<!--outsideHumidity-->,<!--outsideDewPt-->,<!--barometer-->,<!--BarTrend-->,<!--windSpeed-->,<!--windDirection-->,<!--dailyRain-->

Those are called html tags. When properly configured, WeatherLink will read that file, recognize the tags, replace each tag with the correct current value, and the upload the file to your website. Then the fire danger script can read those values whenever the script is called, and calculate the current Chandler Burning Index/Fire Danger.

You need to save that file on your computer, and then set WeatherLink to read it and upload it. Once uploaded, you need to edit the fire danger PHP script to point to that data file to get the values.


Offline dre

  • Member
  • *
  • Posts: 29
    • Weather by the Bay
Re: Fire Danger Script
« Reply #3 on: January 01, 2008, 11:02:00 PM »
Folks,

Thanks for the help.  Be sure to check out my web site and let me know what you think.

Offline dre

  • Member
  • *
  • Posts: 29
    • Weather by the Bay
Re: Fire Danger Script
« Reply #4 on: January 03, 2008, 07:37:55 PM »
Folks,

Well I successfully located all the parts and the program almost works.  But I need a little more help (i think I'm overlooking something).  If I anchor the php script in the HTNL page
phic
   <a href="/fire/firedanger.php">press here for file danger</a>

it works fine, but since it is a link, you have to click on the text to make it work.

What I want to do is to have the graphic showup on the HTM page when its opened, So I put this lin in the HTML file

  <?php include("/fire/firedanger.php"); ?>

it produced no output.  Any ideas what I'm doing wrong?
Thanks
Doug
« Last Edit: January 03, 2008, 07:40:02 PM by dre »

Offline Anole

  • Forecaster
  • *****
  • Posts: 585
    • http://pineislandweather.com
Re: Fire Danger Script
« Reply #5 on: January 03, 2008, 07:44:52 PM »
Folks,

Well I successfully located all the parts and the program almost works.  But I need a little more help (i think I'm overlooking something).  If I anchor the php script in the HTNL page
phic
   <a href="/fire/firedanger.php">press here for file danger</a>

it works fine, but since it is a link, you have to click on the text to make it work.

What I want to do is to have the graphic showup on the HTM page when its opened, So I put this lin in the HTML file

  <?php include("/fire/firedanger.php"); ?>

it produced no output.  Any ideas what I'm doing wrong?
Thanks
Doug

The php include should be a path not a URL. Where in relation to the html page is firedanger.php? Is it in the same directory or in a different one?

Offline dre

  • Member
  • *
  • Posts: 29
    • Weather by the Bay
Re: Fire Danger Script
« Reply #6 on: January 03, 2008, 08:12:37 PM »
firedanger.php is in a sub-directory under the directory the html is in:

   /--|
       |
       |fire  --|
       |         |firedanger.php
       |         |fdl_low
       |         |fdl_high
       |         .
       |         .
       |         .
       |
       |index.html

this is why I have the include as /fire/firedanger.php
Doug

Offline SLOweather

  • Global Moderator
  • Forecaster
  • *****
  • Posts: 3456
    • Weatherelement Moline IL
Re: Fire Danger Script
« Reply #7 on: January 03, 2008, 08:51:41 PM »
I've got mine embedded in a client's index.php like this:

<p align="center"><a href="fireindexes.php"><img src="http://fire.cambriacsd.org/danger/firedanger.php"></a>

Offline dre

  • Member
  • *
  • Posts: 29
    • Weather by the Bay
Re: Fire Danger Script
« Reply #8 on: January 03, 2008, 09:36:47 PM »
Yes, this code will work, but it does not give me the results I want.  I want to see the firedanger level graphic when index.html opens.
Doug

Offline Dal

  • Senior Member
  • **
  • Posts: 82
  • Climbing the cliffs of Moher in my sleep
    • The Sanctuary Weather Station
Re: Fire Danger Script
« Reply #9 on: January 03, 2008, 10:46:09 PM »
Yes, this code will work, but it does not give me the results I want.  I want to see the firedanger level graphic when index.html opens.
Doug
Are you perhaps referring to the way I have it on www.weatherwatch.earthlights.net ? If so, try here...
http://www.southwesternweather.net/scripts.php
« Last Edit: January 03, 2008, 10:47:53 PM by Dal »
Gun tigeadh Solas nan Solas
dha m’ dhridhe doilleir o t’aite.
Gun tigeadh ais an Spioraid Air mo chridhe

Offline dre

  • Member
  • *
  • Posts: 29
    • Weather by the Bay
Re: Fire Danger Script
« Reply #10 on: January 03, 2008, 10:59:41 PM »
Thanks Dal,

Took a look at your web page and figured how to make it work.  Thanks again!!!
Doug

Offline Dal

  • Senior Member
  • **
  • Posts: 82
  • Climbing the cliffs of Moher in my sleep
    • The Sanctuary Weather Station
Re: Fire Danger Script
« Reply #11 on: January 03, 2008, 11:04:23 PM »
Glad I could be of help :)
Gun tigeadh Solas nan Solas
dha m’ dhridhe doilleir o t’aite.
Gun tigeadh ais an Spioraid Air mo chridhe