PHPWeatherLib

PHP Weather Conditions Library

Discussion - Add Post
PostAnonymous - Aug 25 2008 12:22pm - How to handle PHP errors in Weatherlib?
Hi, I've been getting an occassional failure in my website: PHP Warning: file_get_contents(....weather.gov/data/current_obs/KLUK.xml) [function.file-get-contents]: failed to open stream: HTTP request failed! in phpweatherlib.php on line 137 PHP Warning: file_get_contents(//...weather.gov/data/current_obs/KLUK.xml) [function.file-get-contents]: failed to open stream: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in phpweatherlib.php on line 137 PHP Fatal error: Maximum execution time of 30 seconds exceeded in phpweatherlib.php on line 137 these seem to be PHP warnings, and not errors from Weatherlib? what can I do so that my site just skips over the weather XML if it can't be read in?
Postcarolina - Aug 8 2008 10:09am
i need a xml for BUENOS AIRES, i can´t find no one. :/ excelent script!! thanks .
PostDave S. - May 30 2008 3:46am - desabol at gmail.com
Elliott, I love the weather script and really want to integrate it into a site I am developing. Unfortunately, I am a relative php N00b and am having a problem with some of your code. I have found out that my host (Dreamhost) does not allow the use of file_get_contents() or fopen() or any derivatives for pulling files for security reasons. Instead, they recommend the use of cURL. Any thoughts on how I can integrate cURL to accomplish what I need to do to get this working on my site? You can see the wiki article from my host here: wiki.dreamhost.com/Allow_url_fopen. thanks in advance.
PostZaphod - Apr 21 2008 3:26pm
Octeto, try using code SCEL with the script. Or pick a code from www.airlinecodes.co.uk/aptcoderes.asp?country=Chile it MUST be a 4 letter ICAO code though (smaller airports need not apply.) BTW, I am using the script with alot of success, and a minor tweak (if no wind chill, then show heat index/humiture, if neither, show actual). My URL is zaphodb777.dyndns.org/webcam.php Good luck! Zap!
Postocteto - Apr 2 2008 2:37pm - elucero at inet.cl
International weather? Chile for example -is it possible? Thanks,
PostED - Feb 24 2008 8:41pm
Any idea how to show a 5 day span instead of just 1 day?
PostBill - Feb 23 2008 9:18pm - bill7718 at gmail.com
My implementation weather.trouttrucking.com still rough. need to wrap website theme around it. Bill
Postmichael - Oct 20 2007 9:16pm - aiwetir at gmail.com
nice work, finally one that's simple enough for even me :D
Postjamfitz001@hotmail.com - Oct 11 2007 2:17pm - jamfitz001 at hotmail.com
This is awesome, I will incorporate it in my site.
Postnh@mail.com - Jul 18 2007 2:27am - nh at mail.com
It is match.
PostAnonymous - Jul 10 2007 8:40pm
Great tool! Going to use this on my company intranet.
PostAnonymous - Jul 4 2007 7:21pm - uugqc at jgruoka.com
Hello! Good Site! Thanks you! zivrcggcrh
PostSteve Rulas - May 4 2007 8:26am
This is really great - I combined this class with my own class that cached the weather readings so I didn't have to access the source xml too often, which really sped things up. Great stuff. Maybe you should think about including a caching feature on your next release?
PostRJ - Mar 7 2007 7:21am
Wow, this is really cool. Thanks.