Subscribe$num_items = [number of items wanted];
$rss = fetch_rss($URL);
$items = array_slice($rss->items, 0, $num_items);
< ?php require_once('magpierss/rss_fetch.inc'); $num_items=10; $rss=fetch_rss(" http://mefiswap.bluesilver.org/feed/" ); $items=array_slice($rss->items, 0, $num_items);
echo ;
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$date = $item['date'];
echo "$title
";
if($desc)
echo $desc;
}
?>>but this isn't working. (My test page is here.) I'm still getting the entire list of available items in the feed. (I'd get 10, I guess, which is the Magpie default, but there aren't that many items in the feed yet.) From some Googling, I see that array_slice doesn't always seem to work but I haven't been able to find a workable solution.You are not logged in, either login or create an account to post comments
posted by Dreama at 12:33 PM on February 2, 2007