ExpressionEngine® 3 User Guide

Legacy Documentation

You are using the documentation for version 3.5.17. Go here for the latest version or check here for your available upgrades to the latest version.

RSS Parser Class

The RSS Parser Class is singularly used as a factory to create SimplePie objects.

create($url[, $duration = 180[, $cache_name = '']])

Creates a SimplePie object given a url, and optionally a cache duration and name:

$feed = ee()->rss_parser->create(
    30, // 30 minute cache

// Perform operations on SimplePie object...
$offset = 0;
$limit = 5;
foreach ($feed->get_items($offset, $limit) as $index => $item)
  $title = $item->get_title();
  $content = $item->get_content();
  • $url (string) – URL of the RSS feed to parse
  • $duration (int) – (optional) Length of the cache in minutes
  • $cache_name (string) – (optional) Name of feed for namespacing in the cache

SimplePie object

Return type:



If the $url of the feed cannot be found an Exception is thrown.