Ver Mensaje Individual
  #17 (permalink)  
Antiguo 10/04/2010, 10:59
Avatar de jackson666
jackson666
 
Fecha de Ingreso: noviembre-2009
Ubicación: Buenos Aires, Argentina
Mensajes: 1.971
Antigüedad: 14 años, 5 meses
Puntos: 65
Respuesta: Ayuda lector RSS PHP5

Código PHP:
<?php
require ('includes/connect.php');
//hacemos las consultas  
$result=mysql_query("SELECT * FROM rss ORDER BY id Desc"$connect);  
$totalregistros=mysql_num_rows($result);  
//Recogemos las consultas en un array y las mostramos  
while($row=mysql_fetch_array($result)){ 
$long_descripcion=400;
$num_noticias=10;
$n=0;
$dom = new DomDocument();
$dom->load($row['rss']);

$noticias $dom->getElementsByTagName('aca va el nombre de los tags con noticias');

foreach (
$noticias as $noticia){
    foreach(
$noticia as $reg){
        if(
$reg->title!=NULL && $reg->title!='' && $n<$num_noticias){
echo 
'<a href="'.$reg->link.'" target="_blank">'.$reg->title.'</a><br><br>';
            
$n++;
       }
    }
}
}
mysql_free_result($result);
?>
__________________
HV Studio
Diseño y desarrollo web