Weather Widget & RSS?

Hi all,

Im a skilled Javascript / Ajax developer, but ive never had any experience with RSS before. 

I need to produce a weather widget like on this site : -

The javascript of course makes sense to me, but what is going on serverside? E.g., how is the PHP script obtaining UK weather data for the given area/postcode?

Any help much appreciated!

Kind regards,

Why don’t you use PHP Wheather.Weather is a PHP script to provide weather data for cities around the world.I think it will help you.

thanks for your input, ive written my own PHP script using Yahoo’s RSS weather service.

The only problem is, weather is returned by Yahoo’s location codes e.g. “UKXX1822”. But I want my users to search by location name e.g. “London” or post code.

Can anyone think of a way around this? :slight_smile:

Is your code in terms of longitude and latitude?If so you can use Google Geocoder, which supports reverse geocoding returns address_components. You just need to pull out the component of the address tagged with locality and political if you just want the city name. If you want states as well they are tagged with administrative_area_level_1.

Heya, im not using lat / lng nope. In the end I used two tables, one with the codes & location names, and the other with postcodes. I used some clever joins to link the postcodes to the location codes - seems to work ok.

Thanks for your input much appreciated :slight_smile:

Discussion continued Yahoo Weather RSS feed