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

get_image_width()

Description

class SimplePie {
	get_image_width ()
}

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

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_width.txt · Last modified: 2011/03/06 03:56 (external edit)