...

View Full Version : weather on site



esthera
12-26-2005, 12:07 PM
i'm looking to put weather on my site.
I just want to put the degree and maybe a short description -- nothing with a picture like most of the rss weather feed needs.

I tried rssweather.com but half the time the weather does not show.

does anyone have any ideas?

mlseim
12-26-2005, 07:03 PM
esthera,

You could use a remote service (like weatherbug) that displays
it sort of like a site counter. This would require you to give them
credit on your site. There are several of these remote services.

Or, you could make your own using a server-side language, like Perl.

Do you know how to install Perl (cgi) scripts?

I have a little weather snippet that may work - (Weather Underground).
You could use SSI or cookies to display it on your site.

Here is an example of gathering a bunch of info for Minneapolis:
http://www.catpin.com/cgi-bin/weather.pl

You can pick and choose what to gather and display.

The results in the example are displayed by the Perl script. You could
place the results in a cookie and display it on your webpage using
Javascripting. (or using SSI).

Here is the actual Perl Module documentation:
http://search.cpan.org/~mnaguib/Weather-Underground-3.01/

esthera
12-26-2005, 07:13 PM
weatherbug won't work for me as it's not a U.S. state.
i don't know perl - the site is in asp.

mlseim
12-27-2005, 01:27 AM
I don't use ASP ...

The only weather site I can find that is international is
www.weatherunderground.com

Strange why nobody has written an interface for asp.net or PHP ...
at least I can't find one. ..sorry..

esthera
12-27-2005, 08:02 AM
actually I have doen it in asp with an rss feed but i need a place that allows me to take just the degree without a picture.

mlseim
12-27-2005, 02:32 PM
You'll have to find a way to read the HTML source (the text portion) and
parse out the temperature. I don't know the code in asp.net for doing
that. With any server-side language, you should be able to view the HTML
from any URL and parse the text ... grabbing portions of text based on
"matches" (string manipulation).

I looked at this thing (Yahoo RSS),
http://weather.yahoo.com/rss/

It looks like it grabs information from any city worldwide.

Why can't you parse the output from this and take the data you need?

Maybe I just don't understand RSS enough... (I should look into it further).



.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum