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 » get_image_url()

get_image_url()

Description

class SimplePie {
	get_image_url ()
}

RSS 2.0, Atom 1.0, and feeds with iTunes RSS tags are allowed to have a “feed logo”, which is a single image to represent the feed. This method returns the notated URL for that image/logo file.

Availability

  • Available since SimplePie 0.8.

Examples

$feed = new SimplePie();
$feed->set_feed_url('http://simplepie.org/blog/feed/');
$feed->init();
$feed->handle_content_type();
 
echo '<a href="' . $feed->get_image_link() . '" title="' . $feed->get_image_title() . '">';
echo '<img src="' . $feed->get_image_url() . '" width="' . $feed->get_image_width() . '" height="' . $feed->get_image_height() . '" />';
echo '</a>';

See Also


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