0

I'm using Zend Feed to get a feed from a website. When I run it I only get the 10 latest entries. Is there a way to get the whole feed from the website? All the post since the beginning?!

MY code is

$feed = new Zend_Feed_Atom('http://www.site.net/atom.xml');

echo 'The feed contains ' . $feed->count() . ' entries.' . "\n\n";
foreach ($feed as $entry) {
    echo 'Title: ' . $entry->title() . "\n <br/>";
    echo 'ID: ' . $entry->id() . "\n <br/>";
    echo 'Link: ' . $entry->link() . "\n <br/>";
    echo 'Subtitle: ' . $entry->subtitle() . "\n <br/>";
    echo 'Author: ' . $entry->author() . "\n <br/>";
    echo 'Content: ' . $entry->content() . "\n <br/>";
    echo 'Published: ' . $entry->published() . "\n <br/>";
    echo 'Summary: ' . $entry->summary() . "\n\n <br /><br /><br />";
}

Thanks!

4

1 回答 1

0

It depends on whether or not that website actually has a feed that returns all items. Chances are there isn't and it sounds like by default it returns the 10 latest entries. There may be some parameters you can provide along with the feed that control how many items to return, but this is specific to that website and their feed. – drew010

Marked as comunity wiki,because it's not my answer, but it should not stay only in comment

于 2012-05-18T21:40:17.400 回答