Retrieves an RSS feed and parses it. Uses the MagpieRSS and RSSCache (http://magpierss.sourceforge.net/) functions for parsing and automatic caching and the Snoopy HTTP client (http://sourceforge.net/projects/snoopy/) for the actual retrieval.
[edit]
Usage
include_once(ABSPATH . WPINC . '/rss.php');
$rss = fetch_rss($uri);
?>
[edit]
Example
To get and display a list of links for an existing RSS feed:
include_once(ABSPATH . WPINC . '/rss.php'); ?>
= fetch_rss('http://example.com/rss/feed/goes/here'); ?>
foreach ( $rss->items as $item ) : ?>
title='echo $item['title']; ?>'>
echo $item['title']; ?>
endforeach; ?>
[edit]
Parameters
- $uri
- (URI) The URI of the RSS feed you want to retrieve. The resulting parsed feed is returned, with the more interesting and useful bits in the items array.