<?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: How to Read an RSS Feed With PHP &#8211; screencast</title>
	<atom:link href="http://net.tutsplus.com/videos/screencasts/how-to-read-an-rss-feed-with-php-screencast/feed/" rel="self" type="application/rss+xml" />
	<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/</link>
	<description>Web Development &#38; Design Tutorials</description>
	<lastBuildDate>Sat, 20 Mar 2010 16:09:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: caoson148</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-210936</link>
		<dc:creator>caoson148</dc:creator>
		<pubDate>Tue, 23 Feb 2010 07:49:31 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-210936</guid>
		<description>-Question: How do you limit the amount of feeds coming in?
-Reply:
+ index.php: 



+ include/functions.php:

&lt;?php
function getFeed($feed_url, $posts_to_show) {
 
	try 
	{
		$content = file_get_contents($feed_url);
		$x = new SimpleXmlElement($content);
 
		echo &quot;&quot;;
 
		$i = 0;
 
		while ($i &lt; $posts_to_show){
			echo &quot;&lt;a href=&quot;&quot; rel=&quot;nofollow&quot;&gt;channel-&gt;item[$i]-&gt;link . &quot;\&quot; title=\&quot;&quot; . $x-&gt;channel-&gt;item[$i]-&gt;title . &quot;\&quot; target=\&quot;_blank\&quot;&gt;&quot; . $x-&gt;channel-&gt;item[$i]-&gt;title . &quot;&lt;/a&gt;&quot;;
			$i++;
		}
 
		echo &quot;&quot;;
 
	} 
	catch (Exception $e) 
	{
		echo &quot;The blog feed doesn&#039;t seem to be available at the moment...&quot;;
	}
}
?&gt;</description>
		<content:encoded><![CDATA[<p>-Question: How do you limit the amount of feeds coming in?<br />
-Reply:<br />
+ index.php: </p>
<p>+ include/functions.php:</p>
<p>&lt;?php<br />
function getFeed($feed_url, $posts_to_show) {</p>
<p>	try<br />
	{<br />
		$content = file_get_contents($feed_url);<br />
		$x = new SimpleXmlElement($content);</p>
<p>		echo &quot;&#8221;;</p>
<p>		$i = 0;</p>
<p>		while ($i &lt; $posts_to_show){<br />
			echo &quot;<a href="" rel="nofollow">channel-&gt;item[$i]-&gt;link . &#8220;\&#8221; title=\&#8221;" . $x-&gt;channel-&gt;item[$i]-&gt;title . &#8220;\&#8221; target=\&#8221;_blank\&#8221;&gt;&#8221; . $x-&gt;channel-&gt;item[$i]-&gt;title . &#8220;</a>&#8220;;<br />
			$i++;<br />
		}</p>
<p>		echo &#8220;&#8221;;</p>
<p>	}<br />
	catch (Exception $e)<br />
	{<br />
		echo &#8220;The blog feed doesn&#8217;t seem to be available at the moment&#8230;&#8221;;<br />
	}<br />
}<br />
?&gt;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: The Right Way To Build WordPress As A Community News &#124; AEXT.NET</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-159253</link>
		<dc:creator>The Right Way To Build WordPress As A Community News &#124; AEXT.NET</dc:creator>
		<pubDate>Mon, 11 Jan 2010 05:54:15 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-159253</guid>
		<description>[...] How to Read an RSS Feed With PHP – screencast [...]</description>
		<content:encoded><![CDATA[<p>[...] How to Read an RSS Feed With PHP – screencast [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: resw</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-1/#comment-151699</link>
		<dc:creator>resw</dc:creator>
		<pubDate>Fri, 25 Dec 2009 10:51:24 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-151699</guid>
		<description>yeah</description>
		<content:encoded><![CDATA[<p>yeah</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: art.mania</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-133794</link>
		<dc:creator>art.mania</dc:creator>
		<pubDate>Thu, 19 Nov 2009 20:36:12 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-133794</guid>
		<description>hey working cool. thanks!! but i have an issue about chars :S

for example --&gt; He&#039;s going...

show like --&gt; Heâ€™s going... 

why is this problem? how can i fix? :/</description>
		<content:encoded><![CDATA[<p>hey working cool. thanks!! but i have an issue about chars :S</p>
<p>for example &#8211;&gt; He&#8217;s going&#8230;</p>
<p>show like &#8211;&gt; Heâ€™s going&#8230; </p>
<p>why is this problem? how can i fix? :/</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-129890</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 12 Nov 2009 22:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-129890</guid>
		<description>great tut!</description>
		<content:encoded><![CDATA[<p>great tut!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lam Nguyen</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-125119</link>
		<dc:creator>Lam Nguyen</dc:creator>
		<pubDate>Thu, 29 Oct 2009 18:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-125119</guid>
		<description>Thanks, this tuts is great!</description>
		<content:encoded><![CDATA[<p>Thanks, this tuts is great!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Les</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-122031</link>
		<dc:creator>Les</dc:creator>
		<pubDate>Thu, 22 Oct 2009 15:51:47 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-122031</guid>
		<description>Sort it out yourself mate, if you want to call yourself a programmer.

That is what programming is all about - learning to solve your own problems, it&#039;s not about using scripts in the wild and running off to your mummy when you stump your toe.

If you can&#039;t solve this simple error on your own, then how on earth do you expect to make it in the real world?

Someone give him a hanky, please...</description>
		<content:encoded><![CDATA[<p>Sort it out yourself mate, if you want to call yourself a programmer.</p>
<p>That is what programming is all about &#8211; learning to solve your own problems, it&#8217;s not about using scripts in the wild and running off to your mummy when you stump your toe.</p>
<p>If you can&#8217;t solve this simple error on your own, then how on earth do you expect to make it in the real world?</p>
<p>Someone give him a hanky, please&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Les</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-122030</link>
		<dc:creator>Les</dc:creator>
		<pubDate>Thu, 22 Oct 2009 15:48:33 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-122030</guid>
		<description>Wow... Cool tutorial?!

Please... Lets see you do it without SimpleXml... Lets see you do it how real programmers do it and that is with the DOM.

SimpleXml is for... well, simple people really, but to use the DOM takes more brain power - do you have that?! ;)</description>
		<content:encoded><![CDATA[<p>Wow&#8230; Cool tutorial?!</p>
<p>Please&#8230; Lets see you do it without SimpleXml&#8230; Lets see you do it how real programmers do it and that is with the DOM.</p>
<p>SimpleXml is for&#8230; well, simple people really, but to use the DOM takes more brain power &#8211; do you have that?! <img src='http://net.tutsplus.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-100042</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Mon, 31 Aug 2009 17:37:39 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-100042</guid>
		<description>Hi, I am getting this:

Fatal error: Cannot instantiate non-existent class: simplexmlelement in /home/website_name/public_html/includes/functions.php on line 7

I used phpinfo() and allow_url_fopen is set to On.

I make a terrible PHP programmer =p. Can anyone give an example of a fix? Someone mentioned using curl or making sure simpleXml is loaded.

I was trying to use w3schools ajax-rss feed tutorial and that failed giving me 
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/website_name/public_html/getrss.php on line 21. I know my server says it is running PHP 5.2.9

Any PHP ninja/pirates that can hack and slash this? Thanks!</description>
		<content:encoded><![CDATA[<p>Hi, I am getting this:</p>
<p>Fatal error: Cannot instantiate non-existent class: simplexmlelement in /home/website_name/public_html/includes/functions.php on line 7</p>
<p>I used phpinfo() and allow_url_fopen is set to On.</p>
<p>I make a terrible PHP programmer =p. Can anyone give an example of a fix? Someone mentioned using curl or making sure simpleXml is loaded.</p>
<p>I was trying to use w3schools ajax-rss feed tutorial and that failed giving me<br />
Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/website_name/public_html/getrss.php on line 21. I know my server says it is running PHP 5.2.9</p>
<p>Any PHP ninja/pirates that can hack and slash this? Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bryan</title>
		<link>http://net.tutsplus.com/articles/news/how-to-read-an-rss-feed-with-php-screencast/comment-page-2/#comment-87512</link>
		<dc:creator>Bryan</dc:creator>
		<pubDate>Tue, 04 Aug 2009 15:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://nettuts.com/?p=1272#comment-87512</guid>
		<description>Hi

Great tutorial
I got a problem i&#039;m getting this error on my page where the feed should &#039;Invalid argument supplied for foreach()&#039; 

Can any one Help</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>Great tutorial<br />
I got a problem i&#8217;m getting this error on my page where the feed should &#8216;Invalid argument supplied for foreach()&#8217; </p>
<p>Can any one Help</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.090 seconds -->
