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

set_image_handler()

Description

class SimplePie {
	set_image_handler ( [str $page = false], [$qs = 'i'] )
}

Set the handler to enable the display of cached images. Setting set_image_handler() tells SimplePie (a) to cache them in the first place, and (b) the file that will be used to read them back from the cache and display them.

Availability

  • Available since SimplePie 1.0.

Parameters

page

The file that will handle the rendering of the cached images.

qs

The query string that will be used for passing data to the file set in the page parameter.

Examples

Set up the image handler

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->set_image_handler('handler_image.php', 'image'); // handler_image.php?image=67d5fa9a87bad230fb03ea68b9f71090
$feed->init();
$feed->handle_content_type();
echo $feed->get_title();

See Also


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