Zend_Feed-FindFeeds.xml 1.2 KB

12345678910111213141516171819202122232425
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.feed.findFeeds">
  4. <title>Retrieving Feeds from Web Pages</title>
  5. <para>
  6. Web pages often contain <code>&lt;link&gt;</code> tags that refer to feeds with content
  7. relevant to the particular page. <classname>Zend_Feed</classname> enables you to retrieve
  8. all feeds referenced by a web page with one simple method call:
  9. </para>
  10. <programlisting language="php"><![CDATA[
  11. $feedArray = Zend_Feed::findFeeds('http://www.example.com/news.html');
  12. ]]></programlisting>
  13. <para>
  14. Here the <code>findFeeds()</code> method returns an array of
  15. <classname>Zend_Feed_Abstract</classname> objects that are referenced by
  16. <code>&lt;link&gt;</code> tags on the news.html web page. Depending on the type of each
  17. feed, each respective entry in the <code>$feedArray</code> array may be a
  18. <classname>Zend_Feed_Rss</classname> or <classname>Zend_Feed_Atom</classname> instance.
  19. <classname>Zend_Feed</classname> will throw a <classname>Zend_Feed_Exception</classname>
  20. upon failure, such as an HTTP 404 response code or a malformed feed.
  21. </para>
  22. </sect1>
  23. <!--
  24. vim:se ts=4 sw=4 et:
  25. -->