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!

raygo
  • 1,348
  • 5
  • 18
  • 40
  • 2
    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 May 16 '12 at 18:16

1 Answers1

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

Tomáš Fejfar
  • 11,129
  • 8
  • 54
  • 82
  • But how does for example google reader does it? The same blog that Im trying to get with Zend Feed I have it in google reader and there i can go as far as I want to. How can I do that? Thanks! – raygo May 19 '12 at 03:17
  • Google Reader has been reading the feed for some time and it saves the earlier posts, that are not in the feed itself anymore. – Tomáš Fejfar May 19 '12 at 11:15