PHP Classes

File: example-2

Recommend this page to a friend!
  Classes of Matthew Johnston   Current City Weather   example-2   Download  
File: example-2
Role: Example script
Content type: text/plain
Description: Example 2
Class: Current City Weather
Get weather forecast of a city from Wunderground
Author: By
Last change:
Date: 15 years ago
Size: 348 bytes
 

Contents

Class file image Download
<?php
require_once 'Weather_Class.php';
$weather = new Weather("Edmond", "Oklahoma");

echo
"<div align=\"center\"><img src=\"{$weather->getCurrConditionIMG()}\" /><br/>";
echo
$weather->getCurrCondition() . "<br/>";
echo
"Temperature: " . $weather->getCurrTemperature() . "<br/>";
echo
"Humidity: " . $weather->getHumidity() . "</div>";
?>