August 26, 201016 yr Hi all, I'm trying to find out how to get basic weather information on a commercial website my company is building. All we want is something that displays a weather symbol (sun, cloud, rain etc.) and the high and low temps. However, it does need to be unbranded so the free widgets out there are out (plus they generally can't be used on commercial sites anyway). I realise we will most likey need to pay for an unbranded weather service but does anyone know of one that is relatively inexpensive? Thanks.
August 26, 201016 yr wunderground have many options including an xml feed which may mean you can brand the info the way you want. http://www.wunderground.com/US/Region/US/Temperature.html go to the bottom of the page for Custom Weather Services. They can do you something bespoke at $500 a month
August 26, 201016 yr http://www.yourweather.co.uk/resources_free_to_webmaster-London-Europe-United+Kingdom-London--1-34032.html?gclid=CO-it-KB16MCFUj-2AodhntDuQ Here's a link to a completely free weather widget that maybe of some use. Admittedly not the best looking one I've seen, but it may help you out p.s This does offer the high and low temps you asked for, but at the moment those options are grayed out [assuming they're asking you to sign up to the site or pay a small fee for those features I'm not sure] But like I say it maybe useful, even if it is just a temp until you find a better service.
August 26, 201016 yr There are free API's available from weatherbug and wunderground. Also the iGoogle weather gadget uses XML which you can query, here is an example... <?php $ch = curl_init("www.google.com/ig/api?weather=Linlithgow,Scotland"); curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.2. Gecko/20100723 Linux Mint/8 (Helena) Firefox/3.6.8"); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); $output = curl_exec($ch); curl_close($ch); $xml = simplexml_load_string($output); echo '<img src="http://img0.gmodules.com/'.$xml->weather->current_conditions->icon['data'].'" /><br/>'; echo $xml->weather->current_conditions->condition['data'] . ' '; echo $xml->weather->current_conditions->temp_c['data'].'°C<br/>'; ?> Assuming you have PHP5 + CURL.
August 26, 201016 yr Author Thanks for the help guys, particulary Jock as that iGoogle weather gadget could be just the ticket. I will investigate and see what I can get out of it. Cheers.
Create an account or sign in to comment