SimplePie: PHP-based RSS and Atom feed handling
 
  • Overview
  • Demo
  • Blog
  • Download
  • Documentation
  • API Docs
  • Support
  • Issue Tracker
  • FAQ
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • SimplePie
    • API
    • Caching
    • HTTP
    • Parsing

Classes

  • SimplePie
  • SimplePie_Author
  • SimplePie_Caption
  • SimplePie_Category
  • SimplePie_Copyright
  • SimplePie_Core
  • SimplePie_Credit
  • SimplePie_Enclosure
  • SimplePie_Item
  • SimplePie_Rating
  • SimplePie_Restriction
  • SimplePie_Source

Class SimplePie

SimplePie

Direct known subclasses

SimplePie_Core
Package: SimplePie\API
Copyright: 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
License: BSD License
Author: Ryan Parman
Author: Geoffrey Sneddon
Author: Ryan McCue
Located at SimplePie.php
Methods summary
public
# __construct( )

The SimplePie class contains feed level data and options

To use SimplePie, create the SimplePie object with no parameters. You can then set configuration options using the provided methods. After setting them, you must initialise the feed using $feed->init(). At that point the object's methods and properties will be available to you.

Previously, it was possible to pass in the feed URL along with cache options directly into the constructor. This has been removed as of 1.3 as it caused a lot of confusion.

Since

1.0 Preview Release
public
# __toString( )

Used for converting object to a string

public
# __destruct( )

Remove items that link back to this before destroying this object

public
# force_feed( boolean $enable = false )

Force the given data/URL to be treated as a feed

This tells SimplePie to ignore the content-type provided by the server. Be careful when using this option, as it will also disable autodiscovery.

Parameters

$enable
boolean
Force the given data/URL to be treated as a feed

Since

1.1
public
# set_feed_url( string|array $url )

Set the URL of the feed you want to parse

This allows you to enter the URL of the feed you want to parse, or the website you want to try to use auto-discovery on. This takes priority over any set raw data.

You can set multiple feeds to mash together by passing an array instead of a string for the $url. Remember that with each additional feed comes additional processing and resources.

Parameters

$url
string|array
This is the URL (or array of URLs) that you want to parse.

Since

1.0 Preview Release

See

SimplePie::set_raw_data()
public boolean
# set_file( SimplePie_File & $file )

Set an instance of SimplePie_File to use as a feed

Parameters

$file
SimplePie_File
&$file

Returns

boolean
True on success, false on failure
public
# set_raw_data( string $data )

Set the raw XML data to parse

Allows you to use a string of RSS/Atom data instead of a remote feed.

If you have a feed available as a string in PHP, you can tell SimplePie to parse that data string instead of a remote feed. Any set feed URL takes precedence.

Parameters

$data
string
RSS or Atom data as a string.

Since

1.0 Beta 3

See

SimplePie::set_feed_url()
public
# set_timeout( integer $timeout = 10 )

Set the the default timeout for fetching remote feeds

This allows you to change the maximum time the feed's server to respond and send the feed back.

Parameters

$timeout
integer
The maximum number of seconds to spend waiting to retrieve a feed.

Since

1.0 Beta 3
public
# force_fsockopen( boolean $enable = false )

Force SimplePie to use fsockopen() instead of cURL

Parameters

$enable
boolean
Force fsockopen() to be used

Since

1.0 Beta 3
public
# enable_cache( boolean $enable = true )

Enable/disable caching in SimplePie.

This option allows you to disable caching all-together in SimplePie. However, disabling the cache can lead to longer load times.

Parameters

$enable
boolean
Enable caching

Since

1.0 Preview Release
public
# set_cache_duration( integer $seconds = 3600 )

Set the length of time (in seconds) that the contents of a feed will be cached

Parameters

$seconds
integer
The feed content cache duration
public
# set_autodiscovery_cache_duration( integer $seconds = 604800 )

Set the length of time (in seconds) that the autodiscovered feed URL will be cached

Parameters

$seconds
integer
The autodiscovered feed URL cache duration.
public
# set_cache_location( string $location = './cache' )

Set the file system location where the cached files should be stored

Parameters

$location
string
The file system location.
public
# enable_order_by_date( boolean $enable = true )

Set whether feed items should be sorted into reverse chronological order

Parameters

$enable
boolean
Sort as reverse chronological order.
public
# set_input_encoding( string $encoding = false )

Set the character encoding used to parse the feed

This overrides the encoding reported by the feed, however it will fall back to the normal encoding detection if the override fails

Parameters

$encoding
string
Character encoding
public
# set_autodiscovery_level( integer $level = SIMPLEPIE_LOCATOR_ALL )

Set how much feed autodiscovery to do

Parameters

$level
integer
Feed Autodiscovery Level (level can be a combination of the above constants, see bitwise OR operator)

See

SIMPLEPIE_LOCATOR_NONE
SIMPLEPIE_LOCATOR_AUTODISCOVERY
SIMPLEPIE_LOCATOR_LOCAL_EXTENSION
SIMPLEPIE_LOCATOR_LOCAL_BODY
SIMPLEPIE_LOCATOR_REMOTE_EXTENSION
SIMPLEPIE_LOCATOR_REMOTE_BODY
SIMPLEPIE_LOCATOR_ALL
public SimplePie_Registry &
# get_registry( )

Get the class registry

Use this to override SimplePie's default classes

Returns

SimplePie_Registry

See

SimplePie_Registry
public boolean
# set_cache_class( string $class = 'SimplePie_Cache' )

Set which class SimplePie uses for caching

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_locator_class( string $class = 'SimplePie_Locator' )

Set which class SimplePie uses for auto-discovery

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_parser_class( string $class = 'SimplePie_Parser' )

Set which class SimplePie uses for XML parsing

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_file_class( string $class = 'SimplePie_File' )

Set which class SimplePie uses for remote file fetching

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_sanitize_class( string $class = 'SimplePie_Sanitize' )

Set which class SimplePie uses for data sanitization

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_item_class( string $class = 'SimplePie_Item' )

Set which class SimplePie uses for handling feed items

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_author_class( string $class = 'SimplePie_Author' )

Set which class SimplePie uses for handling author data

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_category_class( string $class = 'SimplePie_Category' )

Set which class SimplePie uses for handling category data

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_enclosure_class( string $class = 'SimplePie_Enclosure' )

Set which class SimplePie uses for feed enclosures

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_caption_class( string $class = 'SimplePie_Caption' )

Set which class SimplePie uses for <media:text> captions

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_copyright_class( string $class = 'SimplePie_Copyright' )

Set which class SimplePie uses for <media:copyright>

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_credit_class( string $class = 'SimplePie_Credit' )

Set which class SimplePie uses for <media:credit>

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_rating_class( string $class = 'SimplePie_Rating' )

Set which class SimplePie uses for <media:rating>

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_restriction_class( string $class = 'SimplePie_Restriction' )

Set which class SimplePie uses for <media:restriction>

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_content_type_sniffer_class( string $class = 'SimplePie_Content_Type_Sniffer' )

Set which class SimplePie uses for content-type sniffing

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public boolean
# set_source_class( string $class = 'SimplePie_Source' )

Set which class SimplePie uses item sources

Deprecated

Use SimplePie::get_registry() instead

Parameters

$class
string
Name of custom class

Returns

boolean
True on success, false otherwise

Link

PHP5 extends documentation
public
# set_useragent( string $ua = SIMPLEPIE_USERAGENT )

Set the user agent string

Parameters

$ua
string
New user agent string.
public
# set_cache_name_function( mixed $function = 'md5' )

Set callback function to create cache filename with

Parameters

$function
mixed
Callback function
public
# set_stupidly_fast( boolean $set = false )

Set options to make SP as fast as possible

Forgoes a substantial amount of data sanitization in favor of speed. This turns SimplePie into a dumb parser of feeds.

Parameters

$set
boolean
Whether to set them or not
public
# set_max_checked_feeds( integer $max = 10 )

Set maximum number of feeds to check with autodiscovery

Parameters

$max
integer
Maximum number of feeds to check
public
# remove_div( $enable = true )
public
# strip_htmltags( $tags = '', $encode = null )
public
# encode_instead_of_strip( $enable = true )
public
# strip_attributes( $attribs = '' )
public
# set_output_encoding( string $encoding = 'UTF-8' )

Set the output encoding

Allows you to override SimplePie's output to match that of your webpage. This is useful for times when your webpages are not being served as UTF-8. This setting will be obeyed by SimplePie::handle_content_type(), and is similar to SimplePie::set_input_encoding().

It should be noted, however, that not all character encodings can support all characters. If your page is being served as ISO-8859-1 and you try to display a Japanese feed, you'll likely see garbled characters. Because of this, it is highly recommended to ensure that your webpages are served as UTF-8.

The number of supported character encodings depends on whether your web host supports mbstring, iconv, or both. See http://simplepie.org/wiki/faq/Supported_Character_Encodings for more information.

Parameters

$encoding
string
public
# strip_comments( $strip = false )
public
# set_url_replacements( array|null $element_attribute = null )

Set element/attribute key/value pairs of HTML attributes containing URLs that need to be resolved relative to the feed

Defaults to |a|@href, |area|@href, |blockquote|@cite, |del|@cite,

form @action, img @longdesc, img @src, input @src, ins @cite,
q @cite                

Parameters

$element_attribute
array|null
Element/attribute key/value pairs, null for default

Since

1.0
public
# set_image_handler( str $page = false, str $qs = 'i' )

Set the handler to enable the display of cached images.

Parameters

$page
str
Web-accessible path to the handler_image.php file.
$qs
str
The query string that the value should be passed to.
public
# set_item_limit( integer $limit = 0 )

Set the limit for items returned per-feed with multifeeds

Parameters

$limit
integer
The maximum number of items to return.
public boolean
# init( )

Initialize the feed object

This is what makes everything happen. Period. This is where all of the configuration options get processed, feeds are fetched, cached, and parsed, and all of that other good stuff.

Returns

boolean
True if successful, false otherwise
protected array|true
# fetch_data( SimplePie_Cache|false & $cache )

Fetch the data via SimplePie_File

If the data is already cached, attempt to fetch it from there instead

Parameters

$cache
SimplePie_Cache|false
Cache handler, or false to not load from the cache

Returns

array|true
Returns true if the data was loaded from the cache, or an array of HTTP headers and sniffed type
public string|array
# error( )

Get the error message for the occured error

Returns

string|array
Error message, or array of messages for multifeeds
public string|boolean
# get_raw_data( )

Get the raw XML

This is the same as the old $feed->enable_xml_dump(true), but returns the data instead of printing it.

Returns

string|boolean
Raw XML data, false if the cache is used
public string
# get_encoding( )

Get the character encoding used for output

Returns

string

Since

Preview Release
public
# handle_content_type( string $mime = 'text/html' )

Send the content-type header with correct encoding

This method ensures that the SimplePie-enabled page is being served with the correct mime-type and character encoding HTTP headers (character encoding determined by the SimplePie::set_output_encoding() config option).

This won't work properly if any content or whitespace has already been sent to the browser, because it relies on PHP's header() function, and these are the circumstances under which the function works.

Because it's setting these settings for the entire page (as is the nature of HTTP headers), this should only be used once per page (again, at the top).

Parameters

$mime
string
MIME type to serve the page as
public integer
# get_type( )

Get the type of the feed

This returns a SIMPLEPIE_TYPE_* constant, which can be tested against using bitwise operators

Returns

integer
SIMPLEPIE_TYPE_* constant

Since

0.8 (usage changed to using constants in 1.0)

See

SIMPLEPIE_TYPE_NONE Unknown.
SIMPLEPIE_TYPE_RSS090 RSS 0.90.
SIMPLEPIE_TYPE_RSS091_NETSCAPE RSS 0.91 (Netscape).
SIMPLEPIE_TYPE_RSS091_USERLAND RSS 0.91 (Userland).
SIMPLEPIE_TYPE_RSS091 RSS 0.91.
SIMPLEPIE_TYPE_RSS092 RSS 0.92.
SIMPLEPIE_TYPE_RSS093 RSS 0.93.
SIMPLEPIE_TYPE_RSS094 RSS 0.94.
SIMPLEPIE_TYPE_RSS10 RSS 1.0.
SIMPLEPIE_TYPE_RSS20 RSS 2.0.x.
SIMPLEPIE_TYPE_RSS_RDF RDF-based RSS.
SIMPLEPIE_TYPE_RSS_SYNDICATION Non-RDF-based RSS (truly intended as syndication format).
SIMPLEPIE_TYPE_RSS_ALL Any version of RSS.
SIMPLEPIE_TYPE_ATOM03 Atom 0.3.
SIMPLEPIE_TYPE_ATOM10 Atom 1.0.
SIMPLEPIE_TYPE_ATOM_ALL Any version of Atom.
SIMPLEPIE_TYPE_ALL Any known/supported feed type.
public string|null
# subscribe_url( )

Get the URL for the feed

May or may not be different from the URL passed to SimplePie::set_feed_url(), depending on whether auto-discovery was used.

Returns

string|null

Since

Preview Release (previously called get_feed_url() since SimplePie 0.8.)
public array
# get_feed_tags( string $namespace, string $tag )

Get data for an feed-level element

This method allows you to get access to ANY element/attribute that is a sub-element of the opening feed tag.

The return value is an indexed array of elements matching the given namespace and tag name. Each element has attribs, data and child subkeys. For attribs and child, these contain namespace subkeys. attribs then has one level of associative name => value data (where value is a string) after the namespace. child has tag-indexed keys after the namespace, each member of which is an indexed array matching this same format.

For example:

// This is probably a bad example because we already support
// <media:content> natively, but it shows you how to parse through
// the nodes.
$group = $item->get_item_tags(SIMPLEPIE_NAMESPACE_MEDIARSS, 'group');
$content = $group[0]['child'][SIMPLEPIE_NAMESPACE_MEDIARSS]['content'];
$file = $content[0]['attribs']['']['url'];
echo $file;

Parameters

$namespace
string
The URL of the XML namespace of the elements you're trying to access
$tag
string
Tag name

Returns

array

Since

1.0

See

http://simplepie.org/wiki/faq/supported_xml_namespaces
public array
# get_channel_tags( string $namespace, string $tag )

Get data for an channel-level element

This method allows you to get access to ANY element/attribute in the channel/header section of the feed.

See SimplePie::get_feed_tags() for a description of the return value

Parameters

$namespace
string
The URL of the XML namespace of the elements you're trying to access
$tag
string
Tag name

Returns

array

Since

1.0

See

http://simplepie.org/wiki/faq/supported_xml_namespaces
public array
# get_image_tags( string $namespace, string $tag )

Get data for an channel-level element

This method allows you to get access to ANY element/attribute in the image/logo section of the feed.

See SimplePie::get_feed_tags() for a description of the return value

Parameters

$namespace
string
The URL of the XML namespace of the elements you're trying to access
$tag
string
Tag name

Returns

array

Since

1.0

See

http://simplepie.org/wiki/faq/supported_xml_namespaces
public string
# get_base( array $element = array() )

Get the base URL value from the feed

Uses <xml:base> if available, otherwise uses the first link in the feed, or failing that, the URL of the feed itself.

Parameters

$element
array

Returns

string

See

SimplePie::get_link()
SimplePie::subscribe_url()
public string
# sanitize( string $data, integer $type, string $base = '' )

Sanitize feed data

Parameters

$data
string
Data to sanitize
$type
integer
One of the SIMPLEPIE_CONSTRUCT_* constants
$base
string
Base URL to resolve URLs against

Returns

string
Sanitized data

See

SimplePie_Sanitize::sanitize()
public string|null
# get_title( )

Get the title of the feed

Uses <atom:title>, <title> or <dc:title>

Returns

string|null

Since

1.0 (previously called get_feed_title since 0.8)
public SimplePie_Category|null
# get_category( integer $key = 0 )

Get a category for the feed

Parameters

$key
integer
The category that you want to return. Remember that arrays begin with 0, not 1

Returns

SimplePie_Category|null

Since

Unknown
public array|null
# get_categories( )

Get all categories for the feed

Uses <atom:category>, <category> or <dc:subject>

Returns

array|null
List of SimplePie_Category objects

Since

Unknown
public SimplePie_Author|null
# get_author( integer $key = 0 )

Get an author for the feed

Parameters

$key
integer
The author that you want to return. Remember that arrays begin with 0, not 1

Returns

SimplePie_Author|null

Since

1.1
public array|null
# get_authors( )

Get all authors for the feed

Uses <atom:author>, <author>, <dc:creator> or <itunes:author>

Returns

array|null
List of SimplePie_Author objects

Since

1.1
public SimplePie_Author|null
# get_contributor( integer $key = 0 )

Get a contributor for the feed

Parameters

$key
integer
The contrbutor that you want to return. Remember that arrays begin with 0, not 1

Returns

SimplePie_Author|null

Since

1.1
public array|null
# get_contributors( )

Get all contributors for the feed

Uses <atom:contributor>

Returns

array|null
List of SimplePie_Author objects

Since

1.1
public string|null
# get_link( integer $key = 0, string $rel = 'alternate' )

Get a single link for the feed

Parameters

$key
integer
The link that you want to return. Remember that arrays begin with 0, not 1
$rel
string
The relationship of the link to return

Returns

string|null
Link URL

Since

1.0 (previously called get_feed_link since Preview Release, get_feed_permalink() since 0.8)
public string|null
# get_permalink( )

Get the permalink for the item

Returns the first link available with a relationship of "alternate". Identical to SimplePie::get_link() with key 0

Returns

string|null
Link URL

Since

1.0 (previously called get_feed_link since Preview Release, get_feed_permalink() since 0.8)

See

SimplePie::get_link()

Internal

Added for parity between the parent-level and the item/entry-level.
public array|null
# get_links( string $rel = 'alternate' )

Get all links for the feed

Uses <atom:link> or <link>

Parameters

$rel
string
The relationship of links to return

Returns

array|null
Links found for the feed (strings)

Since

Beta 2
public
# get_all_discovered_feeds( )
public string|null
# get_description( )

Get the content for the item

Uses <atom:subtitle>, <atom:tagline>, <description>, <dc:description>, <itunes:summary> or <itunes:subtitle>

Returns

string|null

Since

1.0 (previously called get_feed_description() since 0.8)
public string|null
# get_copyright( )

Get the copyright info for the feed

Uses <atom:rights>, <atom:copyright> or <dc:rights>

Returns

string|null

Since

1.0 (previously called get_feed_copyright() since 0.8)
public string|null
# get_language( )

Get the language for the feed

Uses <language>, <dc:language>, or @xml_lang

Returns

string|null

Since

1.0 (previously called get_feed_language() since 0.8)
public string|null
# get_latitude( )

Get the latitude coordinates for the item

Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications

Uses <geo:lat> or <georss:point>

Returns

string|null

Since

1.0

Link

W3C WGS84 Basic Geo
GeoRSS
public string|null
# get_longitude( )

Get the longitude coordinates for the feed

Compatible with the W3C WGS84 Basic Geo and GeoRSS specifications

Uses <geo:long>, <geo:lon> or <georss:point>

Returns

string|null

Since

1.0

Link

W3C WGS84 Basic Geo
GeoRSS
public string|null
# get_image_title( )

Get the feed logo's title

RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" title.

Uses <image><title> or <image><dc:title>

Returns

string|null
public string|null
# get_image_url( )

Get the feed logo's URL

RSS 0.9.0, 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to have a "feed logo" URL. This points directly to the image itself.

Uses <itunes:image>, <atom:logo>, <atom:icon>, <image><title> or <image><dc:title>

Returns

string|null
public string|null
# get_image_link( )

Get the feed logo's link

RSS 0.9.0, 1.0 and 2.0 feeds are allowed to have a "feed logo" link. This points to a human-readable page that the image should link to.

Uses <itunes:image>, <atom:logo>, <atom:icon>, <image><title> or <image><dc:title>

Returns

string|null
public integer|float|null
# get_image_width( )

Get the feed logo's link

RSS 2.0 feeds are allowed to have a "feed logo" width.

Uses <image><width> or defaults to 88.0 if no width is specified and the feed is an RSS 2.0 feed.

Returns

integer|float|null
public integer|float|null
# get_image_height( )

Get the feed logo's height

RSS 2.0 feeds are allowed to have a "feed logo" height.

Uses <image><height> or defaults to 31.0 if no height is specified and the feed is an RSS 2.0 feed.

Returns

integer|float|null
public integer
# get_item_quantity( integer $max = 0 )

Get the number of items in the feed

This is well-suited for for() loops with SimplePie::get_item()

Parameters

$max
integer
Maximum value to return. 0 for no limit

Returns

integer
Number of items in the feed
public SimplePie_Item|null
# get_item( integer $key = 0 )

Get a single item from the feed

This is better suited for for() loops, whereas SimplePie::get_items() is better suited for foreach() loops.

Parameters

$key
integer
The item that you want to return. Remember that arrays begin with 0, not 1

Returns

SimplePie_Item|null

Since

Beta 2

See

SimplePie::get_item_quantity()
public array|null
# get_items( integer $start = 0, integer $end = 0 )

Get all items from the feed

This is better suited for for() loops, whereas SimplePie::get_items() is better suited for foreach() loops.

Parameters

$start
integer
Index to start at
$end
integer
Number of items to return. 0 for all items after $start

Returns

array|null
List of SimplePie_Item objects

Since

Beta 2

See

SimplePie::get_item_quantity()
public static boolean
# sort_items( SimplePie $a, SimplePie $b )

Sorting callback for items

Parameters

$a
SimplePie
$b
SimplePie

Returns

boolean
public static array
# merge_items( array $urls, integer $start = 0, integer $end = 0, integer $limit = 0 )

Merge items from several feeds into one

If you're merging multiple feeds together, they need to all have dates for the items or else SimplePie will refuse to sort them.

Parameters

$urls
array
List of SimplePie feed objects to merge
$start
integer
Starting item
$end
integer
Number of items to return
$limit
integer
Maximum number of items per feed

Returns

array

Link

http://simplepie.org/wiki/tutorial/sort_multiple_feeds_by_time_and_date#if_feeds_require_separate_per-feed_settings
Properties summary
public array $data array()
#

Raw data

public mixed $error
#

Error string

public object $sanitize
#

Instance of SimplePie_Sanitize (or other class)

See

SimplePie::set_sanitize_class()
public string $useragent SIMPLEPIE_USERAGENT
#

SimplePie Useragent

See

SimplePie::set_useragent()
public string $feed_url
#

Feed URL

See

SimplePie::set_feed_url()
public object $file
#

Instance of SimplePie_File to use as a feed

See

SimplePie::set_file()
public string $raw_data
#

Raw feed data

See

SimplePie::set_raw_data()
public integer $timeout 10
#

Timeout for fetching remote files

See

SimplePie::set_timeout()
public boolean $force_fsockopen false
#

Forces fsockopen() to be used for remote files instead of cURL, even if a new enough version is installed

See

SimplePie::force_fsockopen()
public boolean $force_feed false
#

Force the given data/URL to be treated as a feed no matter what it appears like

See

SimplePie::force_feed()
public boolean $cache true
#

Enable/Disable Caching

See

SimplePie::enable_cache()
public integer $cache_duration 3600
#

Cache duration (in seconds)

See

SimplePie::set_cache_duration()
public integer $autodiscovery_cache_duration 604800
#

Auto-discovery cache duration (in seconds)

See

SimplePie::set_autodiscovery_cache_duration()
public string $cache_location './cache'
#

Cache location (relative to executing script)

See

SimplePie::set_cache_location()
public string $cache_name_function 'md5'
#

Function that creates the cache filename

See

SimplePie::set_cache_name_function()
public boolean $order_by_date true
#

Reorder feed by date descending

See

SimplePie::enable_order_by_date()
public mixed $input_encoding false
#

Force input encoding to be set to the follow value (false, or anything type-cast to false, disables this feature)

See

SimplePie::set_input_encoding()
public integer $autodiscovery SIMPLEPIE_LOCATOR_ALL
#

Feed Autodiscovery Level

See

SimplePie::set_autodiscovery_level()
public SimplePie_Registry $registry
#

Class registry object

public integer $max_checked_feeds 10
#

Maximum number of feeds to check with autodiscovery

See

SimplePie::set_max_checked_feeds()
public array $all_discovered_feeds array()
#

All the feeds found during the autodiscovery process

See

SimplePie::get_all_discovered_feeds()
public string $image_handler ''
#

Web-accessible path to the handler_image.php file.

See

SimplePie::set_image_handler()
public array $multifeed_url array()
#

Stores the URLs when multiple feeds are being initialized.

See

SimplePie::set_feed_url()
public array $multifeed_objects array()
#

Stores SimplePie objects when multiple feeds initialized.

public array $config_settings null
#

Stores the get_object_vars() array for use with multifeeds.

See

SimplePie::set_feed_url()
public integer $item_limit 0
#

Stores the number of items to return per-feed with multifeeds.

See

SimplePie::set_item_limit()
public array $strip_attributes array('bgsound', 'class', 'expr', 'id', 'style', 'onclick', 'onerror', 'onfinish', 'onmouseover', 'onmouseout', 'onfocus', 'onblur', 'lowsrc', 'dynsrc')
#

Stores the default attributes to be stripped by strip_attributes().

See

SimplePie::strip_attributes()
public array $strip_htmltags array('base', 'blink', 'body', 'doctype', 'embed', 'font', 'form', 'frame', 'frameset', 'html', 'iframe', 'input', 'marquee', 'meta', 'noscript', 'object', 'param', 'script', 'style')
#

Stores the default tags to be stripped by strip_htmltags().

See

SimplePie::strip_htmltags()

Show some love! Wishlists for Geoffrey, Ryan P., and Ryan M.

SimplePie is © 2004–2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue and contributors. Licensed under the BSD License. Hosted thanks to Matt Mullenweg, API documentation generated by ApiGen 2.6.1. Variation on the Feed Icon by Wolfgang Bartelme.