Login   Register  
PHP Classes
elePHPant
Icontem

File: demos/002.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  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: 2012-12-25 09:09
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();