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_timeout()

set_timeout()

Description

class SimplePie {
	set_timeout ( [int $timeout = 10] )
}

Allows you to override the maximum amount of time spent waiting for the remote feed's server to respond and send the feed back so that we can begin processing it.

Availability

  • Available since SimplePie Beta 3.

Parameters

timeout

Number of seconds to wait for the remote server before giving up.

Examples

Wait for 30 seconds

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

See Also


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