Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6

Thread: weather on site

  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts

    weather on site

    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?

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    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/Weat...erground-3.01/

  • #3
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts
    weatherbug won't work for me as it's not a U.S. state.
    i don't know perl - the site is in asp.

  • #4
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    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..

  • #5
    Senior Coder
    Join Date
    May 2004
    Posts
    1,464
    Thanks
    15
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,502
    Thanks
    8
    Thanked 1,089 Times in 1,080 Posts
    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).



    .
    Last edited by mlseim; 12-27-2005 at 01:37 PM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •