PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Amir Jafari  >  MyWeather  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: example file
Class: MyWeather
Get city weather forecast from wunderground.com
Author: By
Last change:
Date: 6 years ago
Size: 686 bytes
 

Contents

Class file image Download
<?php

/* A simple example of MyWeather. AMIR JAFARI. */


/* Configs */

require 'MyWeather.Class.php'; // include "MyWeather" class file

$MyWeather = new MyWeather; // create class

$TheCity = 'tehran'; // set your city with change

$MyWeather = $MyWeather-> getWeather($TheCity); // get datas in array

/* Showing data */

echo "Weather of <b>".$MyWeather['Location']."</b>";
echo
"<br>";
echo
"Temperature : <b>".$MyWeather['Temp']."</b>";
echo
"<br>";
echo
"Humidity : <b>".$MyWeather['Humidity']."</b>";
echo
"<br>";
echo
"Preasure : <b>".$MyWeather['Preasure']."</b>";

/* the End */

?>