SimplePie 1.3.1 is now available. Upgrade now!

SimplePie Documentation.  Learn how to use this thing.  It's way better than going to school.

You are here: Documentation » API Reference » SimplePie » set_autodiscovery_level()

set_autodiscovery_level()

Description

class SimplePie {
	set_autodiscovery_level ( [int $level = SIMPLEPIE_LOCATOR_ALL] )
}

Set how much feed autodiscovery to do. SimplePie's autodiscovery engine takes notes from Mark Pilgrim's Ultra-liberal RSS Locator, points 1-6. These points are referenced below in the parameter section.

Works with autodiscovery along with set_max_checked_feeds() and set_autodiscovery_cache_duration().

Availability

  • Available since SimplePie 1.0.

Parameters

level

Feed Autodiscovery Level (level can be a combination of the following constants, see bitwise OR operator).

  • SIMPLEPIE_LOCATOR_ALL
    All Feed Autodiscovery (points 1-6)
  • SIMPLEPIE_LOCATOR_AUTODISCOVERY
    Feed Link Element Autodiscovery (point 2)
  • SIMPLEPIE_LOCATOR_LOCAL_BODY
    Local Feed Body Autodiscovery (point 3)
  • SIMPLEPIE_LOCATOR_LOCAL_EXTENSION
    Local Feed Extension Autodiscovery (points 4, 5)
  • SIMPLEPIE_LOCATOR_REMOTE_BODY
    Remote Feed Body Autodiscovery (point 6)
  • SIMPLEPIE_LOCATOR_REMOTE_EXTENSION
    Remote Feed Extension Autodiscovery (point 6)
  • SIMPLEPIE_LOCATOR_NONE
    No Autodiscovery

Examples

Disable feed autodiscovery

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->set_autodiscovery_level(SIMPLEPIE_LOCATOR_NONE);
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

See Also


reference/simplepie/set_autodiscovery_level.txt · Last modified: 2012/01/10 00:41 by rmccue