This is ripped straight from a Samurize script:
Firstly, go to:
http://xoap.weather.com/search/search?where=XXXXX
(where XXXXX can be your town name or post/zip code for example) and get the LOC ID.
Then, run the following to get an XML file, where UNIT = s or m (s = standard (F), m = metric (C)), and there are two random 5 digit numbers.
For current day: (Update at most every 30 mins)
Code:
http://xoap.weather.com/weather/local/" & LOCID & "?cc=*" & "&par=" & Int(Rnd * 10000) & "&prod=xoap&key=" & Int(Rnd * 10000) & "&unit=" & UNIT
For DAYF Day forecast: (how far to look ahead)
Code:
"http://xoap.weather.com/weather/local/" & LOCID & "?cc=*&dayf=" & DAYF & "&par=" & Int(Rnd * 10000) & "&prod=xoap&key=" & Int(Rnd * 10000) & "&unit=" & UNIT
So, for example, in my town, Loughton, I go to:
http://xoap.weather.com/search/search?where=Loughton
and it returns:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--This document is intended only for use by authorized licensees of The Weather Channel. Unauthorized use is prohibited. Copyright 1995-2004, The Weather Channel Enterprises, Inc. All Rights Reserved.-->
<search ver="2.0">
<loc id="UKXX1269" type="1">Loughton, United Kingdom</loc>
</search>
So I then go to for current weather:
http://xoap.weather.com/weather/loca...y=34145&unit=m
And I get the following:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--This document is intended only for use by authorized licensees of The Weather Channel. Unauthorized use is prohibited. Copyright 1995-2004, The Weather Channel Enterprises, Inc. All Rights Reserved.-->
<weather ver="2.0">
<head>
<locale>en_US</locale>
<form>MEDIUM</form>
<ut>C</ut>
<ud>km</ud>
<us>km/h</us>
<up>mb</up>
<ur>mm</ur>
</head>
<loc id="UKXX1269">
<dnam>Loughton, United Kingdom</dnam>
<tm>10:54 AM</tm>
<lat>51.64</lat>
<lon>0.06</lon>
<sunr>4:57 AM</sunr>
<suns>9:13 PM</suns>
<zone>1</zone>
</loc>
<cc>
<lsup>7/13/04 10:20 AM Local Time</lsup>
<obst>London City Arpt, United Kingdom</obst>
<tmp>17</tmp>
<flik>17</flik>
<t>Partly Cloudy</t>
<icon>30</icon>
<bar>
<r>1,017.9</r>
<d>steady</d>
</bar>
<wind>
<s>13</s>
<gust>N/A</gust>
<d>290</d>
<t>WNW</t>
</wind>
<hmid>45</hmid>
<vis>10.0</vis>
<uv>
<i>4</i>
<t>Moderate</t>
</uv>
<dewp>5</dewp>
</cc>
</weather>
And for 5 day forecast I go to:
http://xoap.weather.com/weather/loca...y=14648&unit=m
And it returns:
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--This document is intended only for use by authorized licensees of The Weather Channel. Unauthorized use is prohibited. Copyright 1995-2004, The Weather Channel Enterprises, Inc. All Rights Reserved.-->
<weather ver="2.0">
<head>
<locale>en_US</locale>
<form>MEDIUM</form>
<ut>C</ut>
<ud>km</ud>
<us>km/h</us>
<up>mb</up>
<ur>mm</ur>
</head>
<loc id="UKXX1269">
<dnam>Loughton, United Kingdom</dnam>
<tm>10:58 AM</tm>
<lat>51.64</lat>
<lon>0.06</lon>
<sunr>4:57 AM</sunr>
<suns>9:13 PM</suns>
<zone>1</zone>
</loc>
<cc>
<lsup>7/13/04 10:20 AM Local Time</lsup>
<obst>London City Arpt, United Kingdom</obst>
<tmp>17</tmp>
<flik>17</flik>
<t>Partly Cloudy</t>
<icon>30</icon>
<bar>
<r>1,017.9</r>
<d>steady</d>
</bar>
<wind>
<s>13</s>
<gust>N/A</gust>
<d>290</d>
<t>WNW</t>
</wind>
<hmid>45</hmid>
<vis>10.0</vis>
<uv>
<i>4</i>
<t>Moderate</t>
</uv>
<dewp>5</dewp>
</cc>
<dayf>
<lsup>7/13/04 5:44 AM Local Time</lsup>
<day d="0" t="Tuesday" dt="Jul 13">
<hi>21</hi>
<low>12</low>
<sunr>4:57 AM</sunr>
<suns>9:13 PM</suns>
<part p="d">
<icon>30</icon>
<t>Partly Cloudy</t>
<wind>
<s>13</s>
<gust>N/A</gust>
<d>280</d>
<t>W</t>
</wind>
<ppcp>20</ppcp>
<hmid>60</hmid>
</part>
<part p="n">
<icon>29</icon>
<t>Partly Cloudy</t>
<wind>
<s>13</s>
<gust>N/A</gust>
<d>238</d>
<t>WSW</t>
</wind>
<ppcp>20</ppcp>
<hmid>74</hmid>
</part>
</day>
<day d="1" t="Wednesday" dt="Jul 14">
<hi>21</hi>
<low>15</low>
<sunr>4:59 AM</sunr>
<suns>9:12 PM</suns>
<part p="d">
<icon>11</icon>
<t>Few Showers</t>
<wind>
<s>21</s>
<gust>N/A</gust>
<d>241</d>
<t>WSW</t>
</wind>
<ppcp>30</ppcp>
<hmid>78</hmid>
</part>
<part p="n">
<icon>11</icon>
<t>Showers</t>
<wind>
<s>18</s>
<gust>N/A</gust>
<d>253</d>
<t>WSW</t>
</wind>
<ppcp>50</ppcp>
<hmid>81</hmid>
</part>
</day>
<day d="2" t="Thursday" dt="Jul 15">
<hi>20</hi>
<low>14</low>
<sunr>5:00 AM</sunr>
<suns>9:11 PM</suns>
<part p="d">
<icon>11</icon>
<t>Showers</t>
<wind>
<s>21</s>
<gust>N/A</gust>
<d>238</d>
<t>WSW</t>
</wind>
<ppcp>50</ppcp>
<hmid>80</hmid>
</part>
<part p="n">
<icon>11</icon>
<t>Showers</t>
<wind>
<s>13</s>
<gust>N/A</gust>
<d>246</d>
<t>WSW</t>
</wind>
<ppcp>50</ppcp>
<hmid>84</hmid>
</part>
</day>
<day d="3" t="Friday" dt="Jul 16">
<hi>21</hi>
<low>14</low>
<sunr>5:01 AM</sunr>
<suns>9:10 PM</suns>
<part p="d">
<icon>11</icon>
<t>Showers</t>
<wind>
<s>13</s>
<gust>N/A</gust>
<d>245</d>
<t>WSW</t>
</wind>
<ppcp>50</ppcp>
<hmid>80</hmid>
</part>
<part p="n">
<icon>11</icon>
<t>Showers</t>
<wind>
<s>10</s>
<gust>N/A</gust>
<d>226</d>
<t>SW</t>
</wind>
<ppcp>50</ppcp>
<hmid>87</hmid>
</part>
</day>
<day d="4" t="Saturday" dt="Jul 17">
<hi>23</hi>
<low>13</low>
<sunr>5:02 AM</sunr>
<suns>9:09 PM</suns>
<part p="d">
<icon>26</icon>
<t>Cloudy</t>
<wind>
<s>14</s>
<gust>N/A</gust>
<d>234</d>
<t>SW</t>
</wind>
<ppcp>30</ppcp>
<hmid>72</hmid>
</part>
<part p="n">
<icon>29</icon>
<t>Partly Cloudy</t>
<wind>
<s>8</s>
<gust>N/A</gust>
<d>241</d>
<t>WSW</t>
</wind>
<ppcp>20</ppcp>
<hmid>78</hmid>
</part>
</day>
</dayf>
</weather>
This data can then be parsed and displayed how/where you wish
Garry
Bookmarks