jaymc Posted August 4, 2008 Share Posted August 4, 2008 This may be something for U.K based people on here can answer I am looking for a website that has some kind of text feed, maybe RSS to give me the weather forcast I must be able to filter by location using a UK postcode Does anyone know where I can find a service like this? Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/ Share on other sites More sharing options...
.josh Posted August 4, 2008 Share Posted August 4, 2008 have you looking into weatherbug.com? I don't know if they offer rss feeds but they do offer like web widgets and a slew of other neat things so they might (and you can enter in a uk postcode with them) Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/#findComment-607398 Share on other sites More sharing options...
jaymc Posted August 4, 2008 Author Share Posted August 4, 2008 Just had a look They just offer a service to include a banner that does it I need to pass in a postcode and pull out raw stats of which I can create my own interface for Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/#findComment-607497 Share on other sites More sharing options...
proggR Posted August 4, 2008 Share Posted August 4, 2008 Not complete but the same idea: http://www.rssweather.com/dir/index.html And not sure if you've seen this but it looks like its promising: http://developer.yahoo.com/weather/ Or weather.com: http://www.weather.com/weather/rss/subscription Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/#findComment-607520 Share on other sites More sharing options...
WalidAhmad Posted August 5, 2008 Share Posted August 5, 2008 A few months ago, I put together a tutorial which allowed mobile users to query the current and forecast weather of a specific area using SMS (tutorial's here). I began the tutorial on the same premis as your application (i.e. being able to query by post code), but then found out the tutorial was for French readers in which the UK post code system would be of no use. Although I ended up changing the article to meet their needs, here is the logic of how I would have done it for UK... 1. Visit http://en.wikipedia.org/wiki/List_of_postcode_areas_in_the_United_Kingdom and use the list to create an associative array, csv file or an xml file which can be used to translate area codes to area names. 2. Visit http://weather.yahoo.com/regional/UKXX.html and trace down the areas you extracted in #1. When you hover over each area, you will see a code show in the final part of your browser's address bar. For example, the code for Abbey is UKXX1294. 3. When someone queries a post code, such as W14 or W14 8DS, use a regular expression or other method to identify the first letter. 4. Translate the letter into an area name and the area name into a Yahoo API area code and query the Yahoo API with that. So, if you need the weather for W14 7ET, you would extract the W, identify that as being London, identify the Yahoo code as being UKXX0085 and query its API using http://weather.yahooapis.com/forecastrss?p=UKXX0085&u=c (Lastly, be sure to use Arash Hemmat's Yahoo weather component to avoid re-inventing the wheel.) I hope that all helps. Good luck. Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/#findComment-608305 Share on other sites More sharing options...
ober Posted August 5, 2008 Share Posted August 5, 2008 If you need a 5 day forecast, I used: http://weather.msn.com/ They have international feeds and the images are very clean and modern looking compared to some of the other feeds I used. I just parsed out the XML into a styled table and my users simply entered their zipcode into a custom profile field in SMF. Granted, my user base was only in the US, but it should handle codes from around the world. Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/#findComment-608587 Share on other sites More sharing options...
jaymc Posted August 5, 2008 Author Share Posted August 5, 2008 Thanks guys Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/#findComment-608717 Share on other sites More sharing options...
WalidAhmad Posted August 6, 2008 Share Posted August 6, 2008 As destiny should have it, i just came across this and thought you might find it useful... http://jamazon.co.uk/web/2008/07/24/full-uk-postcode-database-for-free/ Quote Link to comment https://forums.phpfreaks.com/topic/118067-solved-weather-rss/#findComment-609287 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.