Login   Register  
PHP Classes

File: Services/weather.example

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Leonardo Branco Shinagawa  >  Feedee  >  Services/weather.example  >  Download  
File: Services/weather.example
Role: Example script
Content type: text/plain
Description: Weather Example
Class: Feedee
Retrieve and parse RSS feed from remote sites
Author: By
Last change:
Date: 4 years ago
Size: 881 bytes


Class file image Download


$weather = new Feedee('weather');

$response $weather->getService()->request();

$response->temperature//current temperature

foreach ($response->forecasts as $forecast)

setPartnerId(); // required
setLicenseKey(); // required
setLocationId(); // required
setForecast(); // optional

$response $weather->getService()->request(); // Get the response from the server
$response->location_name// Location name
$response->temperature// Current temperature
$response->forecasts// Forecast Days, only if setForecast() is set.