Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/05/2009, 18:28
opzina
 
Fecha de Ingreso: marzo-2008
Mensajes: 1.020
Antigüedad: 16 años, 1 mes
Puntos: 21
Lector RSS, no funciona

hola, tengo este codigo el cual hice un include, pero no muestra el feed...a ver si pueden dar con el error..

Código PHP:
<?php 
$long_descripcion
=400;
$num_noticias=4;
$n=0;
$noticias simplexml_load_file(' http://www.lanacion.com.ar/herramientas/rss/index.asp?categoria_id=498');
foreach (
$noticias as $noticia) { 
    foreach(
$noticia as $reg){
        if(
$reg->title!=NULL && $reg->title!='' && $reg->description!=NULL && $reg->description!='' && $n<$num_noticias){
            echo 
'<b><a href="'.$reg->link.'" target="_blank">'.$reg->title.'</a></b><br>';
            if(
strlen($reg->description)>$long_descripcion)
                echo 
'<p>'.substr($reg->description,0,$long_descripcion).'...</a></p><br>';
            else
                echo 
'<p>'.$reg->description.'</p><br>';
            echo 
'Publicado: '.$reg->pubDate.'<br><br>';
            
$n++;
        }
    }
}  
?>
saludos.