Return to Snippet

Revision: 28099
at June 30, 2010 22:05 by orenus


Initial Code
class WeatherService{

	public function WeatherService(){
		//some initialization...
	}
	
	public function getWeatherInfo($city){
		
		$res = shell_exec("./getWdr.sh {$city}");

		return $res;
	}
	
	public function convertFrToC($val){
		return (($val+40)*5/9)-40;
	}

}


$obj = new WeatherService;
$obj->getWeatherInfo("haifa");

Initial URL

                                

Initial Description

                                

Initial Title
Get Weather - Step 3 - Class

Initial Tags
php

Initial Language
PHP