<?php
require_once "magpierss/rss_fetch.inc";
$fichier_xml = "http://www.goziga.com/flux/goziga.xml";
$nombre_element = 12;
$rss = fetch_rss($fichier_xml);
if (is_array($rss->items))
{
$liste = array_slice($rss->items, 0, $nombre_element);
echo "<b>",$rss->channel['title'],"</b><br
/>\n";
foreach ($liste as $item ) {
$title = $item[title]; $url = $item[link];
$pubdate = $item[pubdate];
$category = $item[category];
$pubdate = date("d/m/Y", strtotime($pubdate));
echo "<a href='$url' target=\"_blank\">$title</a><br
/>\n";
}
}
?>