<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Sorting multiple feeds by time and date</title>
	<atom:link href="http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/feed/" rel="self" type="application/rss+xml" />
	<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/</link>
	<description>Behind the scenes of SimplePie development.</description>
	<lastBuildDate>Sun, 12 Feb 2012 16:47:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4-beta4-20805</generator>
	<item>
		<title>By: Finally, a feed reader that suits me &#124; The Montoya Herald</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-7380</link>
		<dc:creator>Finally, a feed reader that suits me &#124; The Montoya Herald</dc:creator>
		<pubDate>Sun, 29 Jul 2007 17:34:01 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-7380</guid>
		<description>[...] done without SimplePie, an excellent feed parsing library for PHP. More specifically, it was the Sorting multiple feeds by time and date tutorial from the SimplePie weblog that allowed me to finish this project so quickly (and made me [...]</description>
		<content:encoded><![CDATA[<p>[...] done without SimplePie, an excellent feed parsing library for PHP. More specifically, it was the Sorting multiple feeds by time and date tutorial from the SimplePie weblog that allowed me to finish this project so quickly (and made me [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gahmen Watchdog, Version 3 &#38;#124 brennan.sg</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-3591</link>
		<dc:creator>Gahmen Watchdog, Version 3 &#38;#124 brennan.sg</dc:creator>
		<pubDate>Wed, 11 Apr 2007 02:07:13 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-3591</guid>
		<description>[...] am working on a customised aggregation system that leverages on the power of SimplePie, around the multifeed demo which demonstrated the use of SimplePie to fetch feeds and sort them according to date. This will [...]</description>
		<content:encoded><![CDATA[<p>[...] am working on a customised aggregation system that leverages on the power of SimplePie, around the multifeed demo which demonstrated the use of SimplePie to fetch feeds and sort them according to date. This will [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scot hacker&#8217;s foobar blog &#187; SimplePie</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-1405</link>
		<dc:creator>scot hacker&#8217;s foobar blog &#187; SimplePie</dc:creator>
		<pubDate>Sat, 09 Dec 2006 06:17:37 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-1405</guid>
		<description>[...] Yay SimplePie! Super-simple RSS class and mash-up tools for web services and integration. Just used it with the multifeeds package to create a mash of antiweb feeds. [...]</description>
		<content:encoded><![CDATA[<p>[...] Yay SimplePie! Super-simple RSS class and mash-up tools for web services and integration. Just used it with the multifeeds package to create a mash of antiweb feeds. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TDH</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-1019</link>
		<dc:creator>TDH</dc:creator>
		<pubDate>Wed, 15 Nov 2006 20:41:47 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-1019</guid>
		<description>Many thanks Ryan, that was exactly what I was looking for. I&#039;ll make sure to buy you something from your wishlist when this month&#039;s payments drop in. :)

Cheers!</description>
		<content:encoded><![CDATA[<p>Many thanks Ryan, that was exactly what I was looking for. I&#8217;ll make sure to buy you something from your wishlist when this month&#8217;s payments drop in. <img src='http://simplepie.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Cheers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Parman</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-1018</link>
		<dc:creator>Ryan Parman</dc:creator>
		<pubDate>Wed, 15 Nov 2006 18:28:45 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-1018</guid>
		<description>We don&#039;t usually monitor the comments for questions, but this might answer TDH&#039;s question: http://simplepie.org/support/viewtopic.php?id=297</description>
		<content:encoded><![CDATA[<p>We don&#8217;t usually monitor the comments for questions, but this might answer TDH&#8217;s question: <a href="http://simplepie.org/support/viewtopic.php?id=297" rel="nofollow">http://simplepie.org/support/viewtopic.php?id=297</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TDH</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-1015</link>
		<dc:creator>TDH</dc:creator>
		<pubDate>Wed, 15 Nov 2006 15:09:17 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-1015</guid>
		<description>Has anyone found a solution to porcupine&#039;s question above? Is there a way to limit the total number of feeds being displayed?

I guess you would do it here?

	// Set your own configuration options as you see fit.
	$feed = new SimplePie();
	$feed-&gt;feed_url($url);
	$feed-&gt;cache_max_minutes(30);
	$feed-&gt;replace_headers(true);
	$feed-&gt;init();</description>
		<content:encoded><![CDATA[<p>Has anyone found a solution to porcupine&#8217;s question above? Is there a way to limit the total number of feeds being displayed?</p>
<p>I guess you would do it here?</p>
<p>	// Set your own configuration options as you see fit.<br />
	$feed = new SimplePie();<br />
	$feed-&gt;feed_url($url);<br />
	$feed-&gt;cache_max_minutes(30);<br />
	$feed-&gt;replace_headers(true);<br />
	$feed-&gt;init();</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Abhimanyu Chirimar</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-877</link>
		<dc:creator>Abhimanyu Chirimar</dc:creator>
		<pubDate>Sat, 04 Nov 2006 14:36:44 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-877</guid>
		<description>Hello,
For me all the dates get set to GMT at the time. I just want to show when they were published.</description>
		<content:encoded><![CDATA[<p>Hello,<br />
For me all the dates get set to GMT at the time. I just want to show when they were published.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris Anthony</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-845</link>
		<dc:creator>Boris Anthony</dc:creator>
		<pubDate>Thu, 19 Oct 2006 21:10:13 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-845</guid>
		<description>oh i&#039;m a dork.. forgot the:
&lt;code&gt;
krsort($items_array);
&lt;/code&gt;
outside the while loop which loops through the array of feed URLs</description>
		<content:encoded><![CDATA[<p>oh i&#8217;m a dork.. forgot the:<br />
<code><br />
krsort($items_array);<br />
</code><br />
outside the while loop which loops through the array of feed URLs</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Boris Anthony</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-844</link>
		<dc:creator>Boris Anthony</dc:creator>
		<pubDate>Thu, 19 Oct 2006 21:07:27 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-844</guid>
		<description>Neat, glad to see the way I did this (hadn&#039;t seen this before) is pretty much exactly the same. Except I use an associative array and jam everything I can into it (including feed context):
&lt;code&gt;
$success_feed_init = $feed-&gt;init();

if ($success_feed_init &amp;&amp; $feed-&gt;data) {
	// Feed info
	$ftitle 	= $feed-&gt;get_feed_title();
	$flink 		= $feed-&gt;get_feed_link();
	if($feed-&gt;get_image_exist()) {
		$fimg = $feed-&gt;get_image_url();
	} else { $fimg = &quot;0&quot;; }
	foreach($feed-&gt;get_items() as $item) {
		// restrict to within last 7 days?
		$item_datestamp 	= strtotime($item-&gt;get_date(&#039;Y-m-d H:i:s&#039;));
		if ($item_datestamp &gt;= $days_ago) {
			// Author info
			// B0rkd in SimplePie??
			//$item_author 	= $item-&gt;get_authors(0);
			//$iauth 			= $item_author-&gt;get_name();
			//$iauthlink 		= $item_author-&gt;get_link();

			$items_array[$item-&gt;get_date(&#039;YmdHis&#039;).&quot;-&quot;.$item-&gt;get_id()] = array(
				&#039;ftitle&#039; 	=&gt; $ftitle,
				&#039;flink&#039; 	=&gt; $flink,
				&#039;fimg&#039; 		=&gt; $fimg,
					//&#039;iauth&#039;		=&gt; $iauth,
					//&#039;iauthlink&#039;	=&gt; $iauthlink,
					&#039;ititle&#039; 	=&gt; $item-&gt;get_title(),
					&#039;iperma&#039; 	=&gt; $item-&gt;get_permalink(),
					&#039;icontent&#039; 	=&gt; $item-&gt;get_description(), 
					&#039;idate&#039; 	=&gt; $item-&gt;get_date(&#039;Y-m-d H:i:s&#039;),
					&#039;idateago&#039; 	=&gt; relativeDate($item-&gt;get_date(&#039;YmdHis&#039;)),
					&#039;icats&#039; 	=&gt; $item-&gt;get_category(),
					&#039;idel&#039;		=&gt; $item-&gt;add_to_delicious(),
					&#039;idigg&#039;		=&gt; $item-&gt;add_to_digg(),
					&#039;ifurl&#039;		=&gt; $item-&gt;add_to_furl(),
					&#039;invine&#039;	=&gt; $item-&gt;add_to_newsvine()
				);
		} else { 
			break ; 
		}
	}
	unset($ftitle);
	unset($flink);
}
&lt;/code&gt;
(there are references to some vars and functions I use that aren&#039;t present in the snippet, namely vars for restriciting to X days ago and a function for making &quot;posted X [time] ago&quot; stamps)
(oh and yeah get_author seems to be busted... even on the demo running here at SimplePie.org. :\
Cheerio.  :)</description>
		<content:encoded><![CDATA[<p>Neat, glad to see the way I did this (hadn&#8217;t seen this before) is pretty much exactly the same. Except I use an associative array and jam everything I can into it (including feed context):<br />
<code><br />
$success_feed_init = $feed-&gt;init();</p>
<p>if ($success_feed_init &amp;&amp; $feed-&gt;data) {<br />
	// Feed info<br />
	$ftitle 	= $feed-&gt;get_feed_title();<br />
	$flink 		= $feed-&gt;get_feed_link();<br />
	if($feed-&gt;get_image_exist()) {<br />
		$fimg = $feed-&gt;get_image_url();<br />
	} else { $fimg = "0"; }<br />
	foreach($feed-&gt;get_items() as $item) {<br />
		// restrict to within last 7 days?<br />
		$item_datestamp 	= strtotime($item-&gt;get_date('Y-m-d H:i:s'));<br />
		if ($item_datestamp &gt;= $days_ago) {<br />
			// Author info<br />
			// B0rkd in SimplePie??<br />
			//$item_author 	= $item-&gt;get_authors(0);<br />
			//$iauth 			= $item_author-&gt;get_name();<br />
			//$iauthlink 		= $item_author-&gt;get_link();</p>
<p>			$items_array[$item-&gt;get_date('YmdHis')."-".$item-&gt;get_id()] = array(<br />
				'ftitle' 	=&gt; $ftitle,<br />
				'flink' 	=&gt; $flink,<br />
				'fimg' 		=&gt; $fimg,<br />
					//'iauth'		=&gt; $iauth,<br />
					//'iauthlink'	=&gt; $iauthlink,<br />
					'ititle' 	=&gt; $item-&gt;get_title(),<br />
					'iperma' 	=&gt; $item-&gt;get_permalink(),<br />
					'icontent' 	=&gt; $item-&gt;get_description(),<br />
					'idate' 	=&gt; $item-&gt;get_date('Y-m-d H:i:s'),<br />
					'idateago' 	=&gt; relativeDate($item-&gt;get_date('YmdHis')),<br />
					'icats' 	=&gt; $item-&gt;get_category(),<br />
					'idel'		=&gt; $item-&gt;add_to_delicious(),<br />
					'idigg'		=&gt; $item-&gt;add_to_digg(),<br />
					'ifurl'		=&gt; $item-&gt;add_to_furl(),<br />
					'invine'	=&gt; $item-&gt;add_to_newsvine()<br />
				);<br />
		} else {<br />
			break ;<br />
		}<br />
	}<br />
	unset($ftitle);<br />
	unset($flink);<br />
}<br />
</code><br />
(there are references to some vars and functions I use that aren&#8217;t present in the snippet, namely vars for restriciting to X days ago and a function for making &#8220;posted X [time] ago&#8221; stamps)<br />
(oh and yeah get_author seems to be busted&#8230; even on the demo running here at SimplePie.org. :\<br />
Cheerio.  <img src='http://simplepie.org/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: denny</title>
		<link>http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/comment-page-1/#comment-825</link>
		<dc:creator>denny</dc:creator>
		<pubDate>Wed, 11 Oct 2006 03:43:36 +0000</pubDate>
		<guid isPermaLink="false">http://simplepie.org/blog/2006/08/23/sorting-multiple-feeds-by-time-and-date/#comment-825</guid>
		<description>is there a script to send email for every feed fetched?
something like rssfwd.com on my own hosting server?</description>
		<content:encoded><![CDATA[<p>is there a script to send email for every feed fetched?<br />
something like rssfwd.com on my own hosting server?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

