PHP Classes

File: demos/002.php

Recommend this page to a friend!
  Classes of Tom Schaefer   Wunderground Weather API   demos/002.php   Download  
File: demos/002.php
Role: Example script
Content type: text/plain
Description: fluent design and echoing png
Class: Wunderground Weather API
Retrieve weather forecasts with Wunderground API
Author: By
Last change: elimintate type
Date: 11 years ago
Size: 438 bytes
 

Contents

Class file image Download
<?php

header
("Content-Type: text/html; charset=utf-8");

include_once
'../api.wunderground.classes.inc.php';

# to get an api key register here http://www.wunderground.com/weather/api/

# completely fluent
echo WundergroundWeather::getInstance("DE")
    ->
apikey("--your api key here--")
    ->
Layers()
        ->
Radar(array("width"=>200, "height"=>200))
        ->
asPNG()
        ->
CityCountry("MI", "Ann_Arbor")
    ->
doRequest()
->
getImage();