Fetches an RSS feed and returns RSS as array
fetch_feed_cache() is the only function you will be using with this plugin. fetch_feed_cache() accepts 2 parameters.
Here is an example of the plugin being used in a template:
<?php $xml = fetch_feed_cache("http://jrtashjian.com/feed/", 60); ?>
<h3><?=$xml->channel->title?></h3>
<ul>
<?php if( ! empty($xml)) : ?>
<?php foreach($xml->channel->item as $item) : ?>
<li><a href="<?=$item->link?>"><?=$item->title?></a></li>
<?php endforeach; ?>
<?php else : ?>
<p>Delicious doesn't seem to be working at the moment...</p>
<?php endif; ?>
</ul>
Remeber, every feed could be different. If you need to see the structure of the object returned just use print_r().
Example: <?php print_r(fetch_feed_cache("http://jrtashjian.com/feed/", 25)); ?>
Requires: 2.5 or higher
Compatible up to: 2.8
Last Updated: 2009-8-11
Downloads: 3,143
Got something to say? Need help?