johnuk — 2010-12-30T05:08:35-05:00 — #1
I need to produce a weather widget like on this site : -
Any help much appreciated!
system — 2010-12-30T05:57:45-05:00 — #2
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.
johnuk — 2010-12-30T07:29:07-05:00 — #3
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?
system — 2010-12-30T12:13:20-05:00 — #4
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.
johnuk — 2010-12-30T12:15:13-05:00 — #5
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
mittineague — 2010-12-30T18:12:29-05:00 — #6