Login   Register  
PHP Classes
elePHPant
Icontem

File: YWeatherExample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of ntf  >  YWeather  >  YWeatherExample.php  >  Download  
File: YWeatherExample.php
Role: Example script
Content type: text/plain
Description: Example to fetch weather of London, UK of Celsius units
Class: YWeather
Get weather information using the Yahoo API
Author: By
Last change:
Date: 2009-04-03 06:24
Size: 295 bytes
 

Contents

Class file image Download
<?php

include 'YWeather.php';
$YWeather = new YWeather('UKXX0085','c'); //UKXX0085 is London, UK , f: Fahrenheit c: Celsius
$YWeather->SetCacheFile('./temp/yweather.cache');
$YWeather->SetLifetime(500); #cache file life time (in second)
var_export$YWeather->Fetch() ); #The weather data