advforecast.php script (Tom's)?

http://brobergs.us/weather/forecast.txt

This is not a point, printable forecast, but this is:

http://www.crh.noaa.gov/ifps/MapClick.php?FcstType=text&textField1=40.0715713500977&textField2=-105.1665420532227&site=den&Radius=0&CiTemplate=0&TextType=2

You’re caching the wrong URL.

Thanks Tom. Sorry I’m still struggling a bit here. Your link looks very similar to mine, but coordinates and elevation are slightly off. I was trying to “zero-in” on a closer “Point”. When I compare this URL to yours, both pages say “Point Forecast”, just the data is slightly different. Can I use this location?
http://www.crh.noaa.gov/ifps/MapClick.php?FcstType=text&textField1=40.048237&textField2=-105.103348&site=den&Radius=0&CiTemplate=0&TextType=2

The only difference I can see is in the longitude and latitude. Do I need more decimal places if the link works on its own?

What was supposed to be in the forecast.txt file?
I’m still puzzled why your original template was working fine, and now it doesn’t.

-David

Any point forecast will work.

The reason it isn’t working is because your cached version is -NOT- a point forecast. You need to change the URL. Once the script grabs a correct point forecast, it will begin working again and should work correctly from now on.

The difference between the regular and the advanced is the caching and better error handling. These not only reduce load on NOAA but reduce the chances of downtime.

Thanks! That did it. Seems to be working now, so I’ll start playing with the templates - fun…

Well, it was working, but recently it stopped again. :frowning:

The link to the point forecast seems to still work:
http://www.crh.noaa.gov/ifps/MapClick.php?FcstType=text&textField1=40.048237&textField2=-105.103348&site=den&Radius=0&CiTemplate=0&TextType=2e=2

But when the php page opens, all it shows is blanks.

Even the unmodified php shows blanks now. Any ideas?
(I updated the links in the above thread, so they should be accurate again.)

I’m taking the plunge to move to PHP and I’m running into the same thing (blank data, just colons). I’d love to hear the solution.

Sorry but Washington State doesn’t have point, printable forecasts that the script keys off of…

Ken has a modified script which may work for you: Saratoga-Weather.org - Scripts

Hey David,

This thread seems to have been buried…

Your script doesn’t seem to be pointed a tthe right URL again.

David:

Your script output shows blanks again, and it may be because your hoster (or www.crh.noaa.gov) have blocked access from your website server’s IP address.

You can fix this by reporting to your webhoster that www.crh.noaa.gov can’t be accessed from your webserver, or you can do what I did … have WD fetch the point forecast URL and save it as ‘forecast.txt’ and upload it to the same directory as your forecast PHP script resides. I do this on 15 minute intervals so the caching part of the script always finds a ‘fresh cache’ and never trys to access the www.crh.noaa.gov site itself.

Beeker425:

Tom is right… The NWS Western Region (www.wrh.noaa.gov) has a different website format than the rest of the NWS websites, so the advforecast script won’t display the Icons and text. For folks in (CA, NV, AZ, UT, ID, MT, OR, WA), the WRH NWS script ( http://saratoga-weather.org/scripts.php#nwsPHP ) works fine. As a bonus :slight_smile: , the WRH NWS script combines PoP with the Icons (like the rest of the NWS sites). The same caveat (getting a blank forecast) that I talked about above applies… Using WD to fetch the URL and preload the cache (wrh-forecast.txt) is the only way the script works for me, as either the wrh.noaa.gov or 1and1 is blocking access from my webserver.

Best regards,
Ken

OK, I’m not getting it.

You say “For folks in (CA, NV, AZ, UT, ID, MT, OR, WA), the WRH NWS script ( http://saratoga-weather.org/scripts.php#nwsPHP ) works fine.”

Yet someone else is saying Washington doesn’t have a page.

Which is it?

I stated that WA doesn’t have a point, printable forecast. You’ll need to use the script that Ken posted, which you also posted, and I also posted (twice now). :roll:

In other words Tom’s script is good for the rest of the country, but us folks in the west have to use Ken’s script.

niko

Yes, in fact the URL and much more seem to be MIA from the script altogether. Somehow FrontPage must have screwed it up again. I’ll have to rebuild it again. Thanks.

Thanks Ken. Turns out it was something else. I do the same as you and actually have a mirror site that was doing the same thing. The main site and the mirror are on two different servers and two different hosts. The script itself is hosed and I’ll have to rebuild it.

I’ve just attempted to set mine up. Can someone shed some light on what I may be doing wrong?

http://69.143.144.53/forecast.php

http://69.143.144.53/forecast.txt

Thanks,
Michael

Sure, you need the printable point forecast (you selected the URL from the first map click)… Here’s the URL you need (based on what’s in your cache file forecast.txt)

http://www.erh.noaa.gov/ifps/MapClick.php?FcstType=text&textField1=39.2156448364258&textField2=-76.7381134033203&site=lwx&Radius=0&CiTemplate=0&TextType=2

Best regards,
Ken

Hi Ken,

Thanks for the response. I think that is the URL that I used. In Tom’s Advanced forecast ( http://www.carterlake.org/advforecast.php.txt), I replaced Tom’s URL ($fileName =) with that identical URL. I’m not sure what it is that I’m doing wrong.

Thanks,

Mike

Mike:
I think the URL you used was just slightly different, as the contents of your cache file showed the parent page of the printable point forecast, not the printable point forecast itself.

Please try copy from the URL in the prior post and paste into the $filename part of the script. I’d checked the URL in the above post in a browser window, and it does yield the printable point forecast. :slight_smile:

Best regards,
Ken

Thanks Ken, I will give this a shot when I get home. (Still at work) I will let you know how it turns out. I appreciate your help.

Mike

Ken,

It worked!!! Thanks for the help!!

Mike