hello, i was in the last 3 days online on the internet trying to embed the yahoo weather data in my site , and after long long search i got that class which i attached. i know the yahoo weather api work in that base http://weather.yahooapis.com/forecastrss?p=$zipcode&u=$unit but the problem is it is kind of complex class and iam not doing very well in the classes the author wrote in the beginning of the lass that /* *** TO USE *** $data = new weather; $data = $data->retrieve(areaCode, units); returns an array * All credit of the icons goes to whoever made them. * */ but i still not able to load the data, so please have a look at the class and help me to load the weather data for city like new york ,area code = USNY0996 thanks
in the "retrieve()" function the class author uses a typecast to INT so the class only uses numeric zip codes or it casts to 0 function retrieve($areaCode, $units, $debug=false) { $this->debug = $debug; $this->areaCode = (int) $areaCode; $this->units = $units; if(!$this->weatherData = $this->retrieveData()) { PHP: this class is built to use with numeric zipcodes I guess. $w=new weather; $data=$w->retrieve("10027", "F"); print_r($data); PHP: removing the (int) typecast, you can use US****** codes and it does return data but that appears to use the yweather: namespace and might require a different parser.