/ Published in: PHP

La siguiente función muestra los tÃtulos, junto con los enlaces, cargados de un RSS.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function lectorRSS($url,$elementos=6,$inicio=0) { if ($status['timed_out']) { } else { } $ContadorNoticias=1; echo "<ul>"; foreach ($noticias->channel->item as $noticia) { if($ContadorNoticias<$elementos){ if($ContadorNoticias>$inicio){ echo "<li><a href='".$noticia->link."' target='_blank' class='tooltip' title='".utf8_decode($noticia->title)."'>"; echo "</a></li>"; } $ContadorNoticias = $ContadorNoticias + 1; } } echo "</ul>"; }
Comments
