PHP Classes

File: YWeatherExample.php

Recommend this page to a friend!
  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: 15 years ago
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