This is the blog of Adam Kalsey. Unusual depth and complexity. Rich, full body with a hint of nutty earthiness.
Freshness Warning
This blog post is over 20 years old. It's possible that the information you read below isn't current and the links no longer work.
14 Jun 2002
It’s not an XML weather feed, but a someone sent a link to some JavaScript on Yahoo that returns the weather for any zip code. If you put this in your Web page:
<SCRIPT LANGUAGE="JavaScript" SRC="http://data.geo.yahoo.com/geo/v1?w=f,95670,10001&hbc=ffffff&hfc=314584
&hff=Verdana&hfs=2&ibc=FFFFFF
&ifc=0000ff&iff=Verdana&ifs=1&
amp;udd=1&ufc=000000&uff=Verdana
&ufs=2&ct=us&tz=UV&
ts=996800400"></script>
What gets displayed is
Just change the 95670,10001 to any zip codes you want. By playing with the JavaScript URL, we’ve also found some other options that can be set.
hbc: Header Background Color
hfc: Header Font Color
hfs: Header Font Size
hff: Header Font Face
ibc: body Background Color (what does I stand for?)
ifc: body Font Color
ifs: body Font Size
iff: body Font Face
It is unknown what the rest of the variables mean. Changing things from udd and beyond had no obvious affect.
While we’d love to give credit where credit’s due, the contributor neglected to sign their email.
It appears that this service is only for the United States, since it uses ZIP codes (US postal codes) to determine what are you want the weather for. I'm not aware of any sort of free weather syndication service. In fact, I'd imagine that this Yahoo JavaScript feed is probably protected by some sort of copyright and was designed for use on Yahoo sites only.
To get New Zealand I changed the ct entry to ct=nz and then for the city info I looked at the url for cities as displayed on the weather page, ie for auckland and wellington NZ the entry is NZXX0003,NZXX0049 The only issue is that it defaults to readings in Fahrenheit. Not sure how to get it to display in the more godly Celsius.
To get Celsius, change ?w=f, to ?w=c,
To display the weather for any city go to http://weather.yahoo.com/forecast/ and type in the name of the city you want displayed in the search box that says "Enter City or Zip Code" and when you have your city's weather displayed look at the URL. The end of the URL should say something like IDXX0022_f.html (for jakarta) replace the zip code in the javascript with IDXX0022 and it should display the correct weather info (for jakarta in this case). This is also usefull when it doesn't display the correct information when using a zip code.
any way that when you click on the city name, it pops a new window instead of writing to the same one?
What's with the red asterisk? What purpose does it serve and is there any way to get rid of it?
I am also having problems with the default Fahrenheit display. I have tried to modify most of the settings in the script without any luck. It would be great if someone can figure out how to do this....
what jon said To get Celsius, change ?w=f, to ?w=c,
I've been looking for a long time for a feed like this. I wrote a program to transform the feed to HTML. Here's the weather for New York city: http://mod2u.com/feeds/micropersuasion_com.rssfeed.htm That's a live RSS stream. I can add one for your city of choice and you can link to it - it's FREE. Hope you like it.
Peter Codrington wrote: Here’s the weather for New York city: http://mod2u.com/feeds/micropersuasion_com.rssfeed.htm 404 error for that. Also this javascript for yahoo weather doesn't anymore---they freeze the output the minute a outside domain hits it.
To display city e.g. Fak-fak (indonesia) replace 95670,10001 become IDXX0086 so it become: <SCRIPT LANGUAGE="JavaScript" ...ta.geo.yahoo.com/geo/v1?w=f,IDXX0086&hbc=ffffff&hfc=314...
Thank you for this. Anyway to launch link in new window?
Is it possible to put the link in an separate js file? Want to keep my website as clean as possible. // Patrik
Anyone know how to get this weather into a flash file SWF
This discussion has been closed.
Tiara
October 22, 2002 11:27 PM
how to syndicate the weather in jakarta, indonesia?