<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>WordPress &#8250; Support Topic: Parsing multiple feeds by fetch_rss</title>
<link>http://wordpress.org/support/</link>
<description>WordPress &#8250; Support Topic: Parsing multiple feeds by fetch_rss</description>
<language>en</language>
<pubDate>Thu, 26 Nov 2009 09:55:41 +0000</pubDate>

<item>
<title>whoisvaibhav on "Parsing multiple feeds by fetch_rss"</title>
<link>http://wordpress.org/support/topic/222720#post-1123141</link>
<pubDate>Wed, 01 Jul 2009 22:40:49 +0000</pubDate>
<dc:creator>whoisvaibhav</dc:creator>
<guid isPermaLink="false">1123141@http://wordpress.org/support/</guid>
<description>&#60;p&#62;$item['pubdate']
&#60;/p&#62;</description>
</item>
<item>
<title>alvanweb on "Parsing multiple feeds by fetch_rss"</title>
<link>http://wordpress.org/support/topic/222720#post-916973</link>
<pubDate>Sun, 07 Dec 2008 13:16:00 +0000</pubDate>
<dc:creator>alvanweb</dc:creator>
<guid isPermaLink="false">916973@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Posted 1 day ago!&#60;br /&#62;
nobody help me?
&#60;/p&#62;</description>
</item>
<item>
<title>alvanweb on "Parsing multiple feeds by fetch_rss"</title>
<link>http://wordpress.org/support/topic/222720#post-915749</link>
<pubDate>Fri, 05 Dec 2008 18:45:18 +0000</pubDate>
<dc:creator>alvanweb</dc:creator>
<guid isPermaLink="false">915749@http://wordpress.org/support/</guid>
<description>&#60;p&#62;Hi&#60;br /&#62;
I need to parse multiple feeds by fetch_rss function. Feeds get from link_rss column in wp_links table. Code that I write here:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;include_once(ABSPATH . WPINC . &#38;#39;/rss.php&#38;#39;);
function rss_fetching (){
	global $wpdb;
	$feeds_url = $wpdb-&#38;gt;get_col(&#38;quot;SELECT link_rss FROM $wpdb-&#38;gt;links&#38;quot;);
	foreach ($feeds_url as $url){
		$rss = fetch_rss($url);

		$maxitems = 1; //Number of display items in each feed
		$items = array_slice($rss-&#38;gt;items, 0, $maxitems);
		echo &#38;#39;&#38;lt;ul&#38;gt;&#38;#39;;
		if (empty($items)){
			echo &#38;#39;&#38;lt;li&#38;gt;No items&#38;lt;/li&#38;gt;&#38;#39;;
		} else {
			foreach ( $items as $item ) {
				echo &#38;quot;&#38;lt;li&#38;gt;&#38;lt;a href=\&#38;quot;&#38;quot;.$item[&#38;#39;link&#38;#39;].&#38;quot;\&#38;quot; title=\&#38;quot;&#38;quot;.$item[&#38;#39;description&#38;#39;].&#38;quot;\&#38;quot;&#38;gt;&#38;quot;.$item[&#38;#39;title&#38;#39;].&#38;quot;&#38;lt;/a&#38;gt;&#38;lt;/li&#38;gt;&#38;quot;;
			}
		}
		echo &#38;#39;&#38;lt;/ul&#38;gt;&#38;#39;;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;&#60;strong&#62;First Q:&#60;/strong&#62;&#60;br /&#62;
This code work exactly but decrease page loading speed! Fetching feeds repeat in each refresh. I know fetch_rss is related with MagpieRSS class. How I can use RSSCache of this class to remove fetching repeat?! Or maybe my code is wrong! because with one feed it&#60;br /&#62;
Work correctly and maybe used cash system of this class!&#60;/p&#62;
&#60;p&#62;&#60;strong&#62;Second Q:&#60;/strong&#62;&#60;br /&#62;
How I can get items date?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
