First off, I'd like to commend Jeff on his fantastic WeatherXML plug-in. It does everything you could ever want and more, beautifully.
But, of course, tinkerers feel the need to re-invent the wheel. There is, after all, a certain thrill when you finally get something to work.
The 403 error is discussed at length in the WeatherXML forum, but I have 2 questions.
First, it would appear that NOAA has changed the rules for it's XML site. However,contrary to what i read, my HS2 script continues to work.
(abbreviated)
Sub main()
xmlfile = "http://w1.weather.gov/xml/current_obs/KCBG.xml"
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objxmlDoc.async = False
objXMLDoc.load(xmlfile)
Loads just fine, it is my HS3 .vb script that returns the error
Public Sub Main(ByVal Parms as Object)
DIM NOAAUrl As String = http://w1.weather.gov/xml/current_obs/KCBG.xml"
Dim NOAAXML As XMLDocument
NOAAXml.Load(NOAAUrl)
Returns the 403 Forbidden error. (I presume it is at least trying to load in order to return the error)
Why would the one continue to work after NOAA's change & the other not?
Second, of course, is what on earth is an "HTTPRequestHeader.UserAgent"
and how do you put it in a script ?
Thanks for sharing, without the examples posted here I would be even deeper in the weeds.
Paul
But, of course, tinkerers feel the need to re-invent the wheel. There is, after all, a certain thrill when you finally get something to work.
The 403 error is discussed at length in the WeatherXML forum, but I have 2 questions.
First, it would appear that NOAA has changed the rules for it's XML site. However,contrary to what i read, my HS2 script continues to work.
(abbreviated)
Sub main()
xmlfile = "http://w1.weather.gov/xml/current_obs/KCBG.xml"
Set objXMLDoc = CreateObject("Microsoft.XMLDOM")
objxmlDoc.async = False
objXMLDoc.load(xmlfile)
Loads just fine, it is my HS3 .vb script that returns the error
Public Sub Main(ByVal Parms as Object)
DIM NOAAUrl As String = http://w1.weather.gov/xml/current_obs/KCBG.xml"
Dim NOAAXML As XMLDocument
NOAAXml.Load(NOAAUrl)
Returns the 403 Forbidden error. (I presume it is at least trying to load in order to return the error)
Why would the one continue to work after NOAA's change & the other not?
Second, of course, is what on earth is an "HTTPRequestHeader.UserAgent"
and how do you put it in a script ?
Thanks for sharing, without the examples posted here I would be even deeper in the weeds.
Paul
Comment