franhernandez / weather
Library Weather in PHP
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/franhernandez/weather
Requires
- php: >=5.3.0
- guzzle/guzzle: 3.7.*
- phpunit/phpunit: 3.7.*@dev
This package is not auto-updated.
Last update: 2025-10-25 21:40:22 UTC
README
Weather
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/>
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)