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

Search

You can find the results of your search below. If you didn't find what you were looking for, you can create or edit the page named after your query with the appropriate button.

Results


SimplePie 1.0 "Razzleberry": 152 Hits
guage" HTTP header (RC1) * Added the ability to get an item's parent feed via ''[[reference:SimplePie_Item::get_feed]]''. (RC1) * Improved ... sizing. Defaults to 480x270. (RC1) * Added ''[[reference:SimplePie:subscribe_itunes]]'', which allows for automatic ... icient image caching functionality. (RC1) * ''[[reference:SimplePie:set_cache_duration]]'' (formerly ''cache_max_minu... nutes. (RC1) * The amount of autodiscovery that SimplePie does can be configured using ''[[reference:SimplePie:set_autodiscovery_level]]''. (RC1) *
embed(): 48 Hits
); foreach ($feed->get_items() as $item) { if ($enclosure = $item->get_enclosure()) { echo $enclosure->embed(arr... rue )); } }</code> ===== See Also ===== * [[reference:SimplePie:start]] * [[reference:SimplePie_Item:start]] * [[reference:SimplePie_Enclosure:start]] * [[reference:SimplePie_Enclosure:native_embed
native_embed(): 47 Hits
); foreach ($feed->get_items() as $item) { if ($enclosure = $item->get_enclosure()) { echo $enclosure->native_em... rue )); } }</code> ===== See Also ===== * [[reference:SimplePie:start]] * [[reference:SimplePie_Item:start]] * [[reference:SimplePie_Enclosure:start]] * [[reference:SimplePie_Enclosure:embed]]
How do I get a thumbnail from a YouTube feed?: 24 Hits
====== How do I get a thumbnail from a YouTube feed? ====== SimplePie 1.0 introduces full support for [[http://search.yahoo.com/mrss|Media RSS]] -- a popular set of tags geared for media files, and are added to RSS and Atom feeds. :!: This tutorial assumes that you're already familiar with using SimplePie, including looping through items. This is only sample code, and you should not create real pages using the (horrid) HTML generated by this example. ===== Compatibility ===== * Supported in SimplePie 1.0. * Code in this tutorial should be compatible with PHP 4.3 or newer, and should not use PHP short tags, in order to support the largest number of PHP installations. ===== Code source ===== <code php><?php // Make sure that SimplePie is loaded require_once('simplepie.inc'); // Let's simplify this with the shorter syntax. http://simplepie.org/wiki/reference/simplepie/start $feed = new SimplePie('http://youtube.com/rss/global/top_favorites.rss'); // Make sure the content is being served out to the browser properly. $feed->handle_content_type(); foreach ($feed->get_items() as $item) { // As long as an enclosure exists... if ($enclosure = $item->get_enclosure()) { // Display the thumbnail as an image and link it back to the YouTube page, and adding the video's title as a tooltip for the link. echo '<a href="' . $item->get_permalink() . '" title="' . $item->get_title() . '"><img src="' . $enclosure->get_thumbnail() . '" /></a>'; } } ?></code>