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