Adds support for RSS enclosures and fixes some character encoding problems.
This plugin is only going to be of use to you if:
fetch_rss() function and want to parse enclosures contained in the feed; orfetch_rss() and question marks are showing up somewhere in the feed where special characters are supposed to be.It's easy. The syntax is similar to getting other items in your feed such as the title:
# Grab your feed from $feed_url:
$feed = fetch_rss( $feed_url );
# Grab the title of the first entry:
$title = $feed->items[0]['title'];
# Grab the URL of the first enclosure from the first entry:
$enclosure = $feed->items[0]['enclosure'][0]['url']);
This is an over-simplified example! Don't forget to use sanity checks in your code. You'll probably want to use foreach() to loop over your entries too. If you're not sure what the contents of your feed looks like, you can always dump it out using:
echo '<pre>';
print_r( $feed->items );
echo '</pre>';
Requires: 2.3 or higher
Compatible up to: 2.7
Last Updated: 2008-12-16
Downloads: 2,574
Got something to say? Need help?