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?
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.
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.