{"id":435,"date":"2003-09-18T20:26:54","date_gmt":"2003-09-18T20:26:54","guid":{"rendered":"http:\/\/dev.adambowie.com\/2003\/09\/weather\/"},"modified":"2003-09-18T20:26:54","modified_gmt":"2003-09-18T20:26:54","slug":"weather","status":"publish","type":"post","link":"https:\/\/dev.adambowie.com\/blog\/2003\/09\/weather\/","title":{"rendered":"Weather"},"content":{"rendered":"<p>Well I&#8217;ve got to say that I absolutely love the PHP weather thing that I&#8217;ve got running on the index page now. I could maybe tidy up how it appears, and there are all sorts of fancy graphical devices that could be used, but in the short term, this scripting does something I&#8217;ve wanted to do from ages.<br \/>\nBasically I found a <a href=\"http:\/\/www.arvidbux.nl\/weblog\/comments.php?id=P26_0_1_0\">script<\/a> that pulls content from a webpage. I used the simplified text only version of the BBC&#8217;s weather page for London. The basic script only pulled a section of text based on a start and end search expression, which was a little to simplified for me, but it gave me the intelligence to go further.<br \/>\nI wrote a bit of code to parse the returned data, and then reformat it into a simple table structure. Of course at the moment, it does rebuild every time I refresh the page, but I&#8217;m sure that the BBC can cope.<br \/>\nAs I say, a collection of graphics corresponding to the words that the BBC use to standardly describe the weather would be next, with the correct graphics appearing correspondingly. I&#8217;d also ideally lose the Fahrenheit values and I&#8217;m a metric man where temperatures are concerned.<br \/>\nSomehow I never managed to get an off-the-shelf script to do all this for me before, so I&#8217;m pleased that I&#8217;ve managed to learn enough about how you use PHP to do what I have. Plenty more to be learnt however!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Well I&#8217;ve got to say that I absolutely love the PHP weather thing that I&#8217;ve got running on the index page now. I could maybe tidy up how it appears, and there are all sorts of fancy graphical devices that could be used, but in the short term, this scripting does something I&#8217;ve wanted to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/posts\/435"}],"collection":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/comments?post=435"}],"version-history":[{"count":0,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/posts\/435\/revisions"}],"wp:attachment":[{"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/media?parent=435"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/categories?post=435"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dev.adambowie.com\/blog\/wp-json\/wp\/v2\/tags?post=435"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}