NEW AtomFeed.php Program

If you need something to use right now, you can use my web page below until curly gets his script developed. It will accept zone, county codes, and marine zones. Just change the last six characters after cozone=. The letters need to be all upper case i.e. CAZ508, CAC001. The results are cached for 5 minutes after which, you only need to reload the page.

http://ucweather.org/localadv.php?cozone=CAZ508

Also, if you want to display the whole state, you can use this one, Just change the last two characters (state abbreviation) after state= which can be upper or lower case.

http://ucweather.org/stateadv.php?state=ca

This is one of three projects that I have going on at the moment and haven’t had much time to spend on it.
Should be able to get back on it next week.

Excellent. No problem, as understand Holiday issues getting in the way. No rush!

Merry CHRISTmas and Happy New Year!!

Is there any update on the new script?

Getting close…

The source of the data isn’t stable at the moment but here is what I have so far.
http://www.weather.ricksturf.com/wxSWSalerts.php?WFO=iwx

Thats cool Curly. Looking good. Can’t wait to try it out.

Holy crap. That’s fantastic Curly!

Looking good… Can’t wait for it… What source are you using?

What source are you using?

NWS web pages.

I have questions about getting started with AtomFeed that I haven’t been able to scour out. How is the AtomArray.php file created?

I followed the included instructions , creating an atomalerts folder, placing the included files in the proper places, setting up the vbs file in Taskmanager, and editing the AtomFeed-config.php. I then call up http://patricksweeneydds.com/atomalerts/AtomFeed.php, but there are a plethora of errors.
I created a blank AtomArray.php file and uploaded it to the root folder, but that didn’t help.
Am I biting off more than I can chew?

I’ve enclosed txt files of php files and a view of the atomalerts folder.
Thanks in advance for any clues.

Pat


AtomFeed-config.txt (7.43 KB)

AtomStatus.txt (638 Bytes)

AtomArray.txt (601 Bytes)

ScreenShot035.jpg

I’m getting close.
There are txt files in my atomalerts/work folder now(Atom-CAZ019.txt and Atom-CAZ062.txt),
but still not showing up on my website.

When opening AtomFeed.php, there is only one error message now:

Warning: copy(…/AtomArray.php) [function.copy]: failed to open stream: Permission denied in /virtual/users/e14790-15223/web/atomalerts/AtomFeed.php on line 1304
Copying work file to array file failed. Check file permissions if this persists

Here is my AtomStatus.txt

[b]

[/b]

I’m not sure how to get the work file to the array.

Warning: copy(../AtomArray.php) [function.copy]: failed to open stream: Permission denied in /virtual/users/e14790-15223/web/atomalerts/AtomFeed.php on line 1304 Copying work file to array file failed. Check file permissions if this persists

A file permission level is not allowing the script to copy a file to another folder.
The file is named AtomArray.php and it’s location would be in your web folder.
Since the AtomFeed script is writng the updates to the work folder, I suspect the AtomArray.php file needs the permission level bumped up.

The text files in the work folder are updating like they should but the final AtomFeed data output file, AtomArray.php, isn’t getting updated.

You ARE getting close…

AH HA!!!

You the man. Thank you so much.
777 did the trick.

Great!

I would not keep it at 777 though.
Try backing it down.

Curly, getting some errors on my Atom Alerts from time to time.
They errors are also not always the same zones:

*ERROR in fetching data. Cache file not updated. string length: 0 code: NYZ037
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYC065
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYC043
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYZ038
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYZ046
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYZ008
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYZ018
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYZ045
*ERROR in fetching data. Cache file not updated. string length: 0 code: NYZ006

Tony.

Been getting those errors here also on various locations.

I went to the NWS site and some of their pages that I’m getting the errors on are loading slowly, or they are blank. 3 - 11 seconds on some of them.

If nothing is there (string length: 0 ) or it takes too long to fetch, the script moves on.

I tried some of those feeds also that cnyweather is having trouble with using feedvalidator.org and get

Sorry
This feed does not validate.

NWS is going through a ruff spot again I too am getting the same error Half the time my web page has it correct and other times it says that NWS is having problems :frowning:

Mark

Curly,
Does your script handle more than two zones per county? My county has 7 zones and I am getting the error messages:

Here is the relevant part of the config file:

"HIZ005" => "Oahu South Shore", // Priority zone listed first
"HIC003" => array(1 => "HIC003", 'a' => "HIZ005", 'b' => "HIZ006", 'c' => "HIZ007",
                  'd' => "HIZ008", 'e' => "HIZ009", 'f' => "HIZ010",
                  'g' => "HIZ011"),
                  // COUNTY CODE => COUNTY CODE => ZONE CODE
"HIZ006" => "Waianae Coast",
"HIZ007" => "Oahu North Shore",
"HIZ008" => "Oahu Koolau",
"HIZ009" => "Olomana",
"HIZ010" => "Central Oahu",
"HIZ011" => "Waianae Mountains"

Thank you,
Jeffrey

It only does two zones per county when comparing the two for differences.
The alert messages are letting you know that those added zones don’t have a county to compare with.

You can get around this by not using the HIC003 array and having all zones listed separately.


    "HIZ005" => "Oahu South Shore", // Priority zone listed first
    "HIC003" => "Honolulu",
    "HIZ006" => "Waianae Coast",
    "HIZ007" => "Oahu North Shore",
    "HIZ008" => "Oahu Koolau",
    "HIZ009" => "Olomana",
    "HIZ010" => "Central Oahu",
    "HIZ011" => "Waianae Mountains"