franhernandez/weather

Library Weather in PHP

dev-master 2014-05-25 15:11 UTC

This package is not auto-updated.

Last update: 2024-04-13 13:40:02 UTC


README

PHP Library Weather (Yahoo Api), using HTTP Client Guzzle.
Guzzle: http://guzzle.readthedocs.org/en/latest/http-client/client.html#creating-a-client
Yahoo Api Weather: https://developer.yahoo.com/weather/

Here's an example:

$woeid = '753692'; //From Barcelona City
$library = new WeatherLibrary();
$library->getWeatherFromWoeid($woeid);

Response:

<img src="http://l.yimg.com/a/i/us/we/52/28.gif"/><br />
<b>Current Conditions:</b><br />
Mostly Cloudy, 68 F<BR />
<BR /><b>Forecast:</b><BR />
Sun - Mostly Clear. High: 68 Low: 60<br />
Mon - Thunderstorms. High: 67 Low: 58<br />
Tue - Partly Cloudy. High: 69 Low: 59<br />
Wed - Showers. High: 66 Low: 58<br />
Thu - Mostly Sunny. High: 68 Low: 60<br />
<br />
<a href="http://us.rd.yahoo.com/dailynews/rss/weather/Barcelona__ES/*http://weather.yahoo.com/forecast/SPXX0015_f.html">Full Forecast at Yahoo! Weather</a><BR/><BR/>
(provided by <a href="http://www.weather.com" >The Weather Channel</a>)<br/>

687474703a2f2f6c2e79696d672e636f6d2f612f692f75732f77652f35322f32382e676966
Current Conditions:
Mostly Cloudy, 68 F

Forecast:
Sun - Mostly Clear. High: 68 Low: 60
Mon - Thunderstorms. High: 67 Low: 58
Tue - Partly Cloudy. High: 69 Low: 59
Wed - Showers. High: 66 Low: 58
Thu - Mostly Sunny. High: 68 Low: 60

Full Forecast at Yahoo! Weather

(provided by The Weather Channel)