Location: PHPKode > scripts > simpleTagReader > simpletagreader/example_RSS.php
<?php
// read current weather conditions in Tabriz/Iran from Yahoo! Weather
require_once('class.simpleTagReader.php');

$City = "IRXX0016";
$Unit = "c"; // c or f
$yahooWeather = new simpleTagReader('http://xml.weather.yahoo.com/forecastrss?p='.$City.'&u='.$Unit.'');

$result = $yahooWeather->readAllTags('description');//first Tag: $result[0] & Second(Last) Tag: $result[1]
echo substr($result[1], 9, -3);

echo "<br />OR<br />";

$result = $yahooWeather->readTag('description', 2);//to read first Tag: $yahooWeather->readTag('description', 1);
echo substr($result, 9, -3);
?>
Return current item: simpleTagReader