SimplePie 1.5 is now available!

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

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

set_max_checked_feeds()

Description

class SimplePie {
	set_max_checked_feeds ( [int $max = 10] )
}

This tells SimplePie's ultra-liberal feed locator how many URLs to check for feeds. If a site is obviously feed-enabled, and SimplePie isn't picking up the feed, you can try increasing this value. On the other hand, keeping this value lower prevents things like a runaway script when it encounters a 404 page with a hundred non-feed links on it.

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

Availability

  • Available since SimplePie 1.0.

Parameters

max

The maximum number of URLs to check for feeds.

Examples

Increase the number of URLs to check

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

See Also


reference/simplepie/set_max_checked_feeds.txt · Last modified: 2011/03/06 03:56 (external edit)