hello,
i was trying to embed the weather data into my site , i got
the code but it works for the title and the descriptions only and it
didnt work for the other data like the
city,region,timezone,sunrise,sunset,...... the all of the other things
didnt work . so here is my code and please tell me why it didnt work
CODE
<?
$feed_url = "http://weather.yahooapis.com/forecastrss?p=94089&u=c";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL,"$feed_url");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 0);
$xmlTwitter = curl_exec($curl);
curl_close($curl);
$xml = simplexml_load_string($xmlTwitter);
foreach ($xml->channel as $channel ){
$title = $channel->item->title;
$description = $channel->item->description;
$city = $channel->item->city;
$acttemp = $channel->item->acttemp;
$sunrise = $channel->item->sunrise;
}
echo "1-- ".$title;
echo "<br>";
echo "2-- ".$city;
echo "<br>";
echo "3-- ".$acttemp;
echo "<br>";
echo "4-- ".$sunrise;
echo "<br>";
?>
please guys i wanna display the all data like High temp, low temp, Sunset, Sunrise, Wind, Visibilit, Humidity, Feels Like.....and the same for the next days too. with no loaders or scripts , just simple code like the one i got .
please guys any help