Código PHP:
<?php
function get_data($chaine){
$fp = fopen ($chaine, 'r');
while (! feof ($fp)){
$contenu .= fgets ($fp, 1024);
if (stristr($contenu, '<description>' )){
break;
}
}
if (eregi("<description>(.*)</description>", $contenu, $out)) {
return $out[1];
}
else{
return false;
}
}
echo get_data('http://www.wunderground.com/auto/rss_full/global/stations/76001.xml');
?>
como se daran cuenta quiero extraer la informacion contenida en el segundo tag <description> pero este script solo me devuelve el de el primer tag
![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)
alguna solucion para obtener el 2do o los dos 2 ??
![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)
![Adios](http://static.forosdelweb.com/fdwtheme/images/smilies/adios.gif)