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": 164 Hits
for accessing //ANY// element or attribute in the feed via ''[[reference:SimplePie:get_channel_tags]]'', ''[[reference:SimplePie:get_feed_tags]]'', ''[[reference:Simple... 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
set_item_class(): 56 Hits
the Google-namespaced <gd:when> tag. // http://simplepie.org/wiki/tutorial/grab_custom_tags_or_attributes $when =... } } // Let's do our standard SimplePie thing. $feed = new SimplePie(); $feed->set_feed_url('http://www.google.com/cal... ontent_type(); ?> <html> <body> <?php foreach ($feed->get_items(0,5) as $item): ?> <h4><a href="<?php echo $item->get_permali... </body> </html></code> ===== See Also ===== * [[reference:SimplePie:start]] * [[reference:SimplePie_Item:start]]
Sorting by custom criteria instead of date: 45 Hits
ab extra Digg-specific data, and we'll extend the SimplePie class and override the [[reference:SimplePie:sort_items]] method to sort by number o... necessary libraries. Digg Add-on found at http://simplepie.org/wiki/addons/digg require_once('simplepie.inc'); requir... 9; } </style> </head> <body> <?php foreach ($feed->get_items() as $item): ?> <h2><span class="diggs"><?php echo $item->get_digg_count(); ?></span> <a href="<?php echo $item->get_permalink(); ?>"><
embed(): 40 Hits
ideo resolution. ===== Examples ===== <code php>$feed = new SimplePie(); $feed->set_feed_url('http://youtube.com/rss/gl... >init(); $feed->handle_content_type(); foreach ($feed->get_items() as $item) { if ($enclosure = $item->get_enclosure()) { ... rue )); } }</code> ===== See Also ===== * [[reference:SimplePie:start]] * [[reference:SimplePie_Item:start]] * [[reference:SimplePie_Enclosure:start]] * [[reference:SimplePie_Enclosure:native_embed
native_embed(): 39 Hits
ideo resolution. ===== Examples ===== <code php>$feed = new SimplePie(); $feed->set_feed_url('http://youtube.com/rss/gl... >init(); $feed->handle_content_type(); foreach ($feed->get_items() as $item) { if ($enclosure = $item->get_enclosure()) { ... rue )); } }</code> ===== See Also ===== * [[reference:SimplePie:start]] * [[reference:SimplePie_Item:start]] * [[reference:SimplePie_Enclosure:start]] * [[reference:SimplePie_Enclosure:embed]]
Translate timestamps into another language: 29 Hits
fault, PHP displays timestamps in English. Since SimplePie's [[reference:SimplePie_Item:get_date]] method relies on PHP's ... unction, get_date() is English-only. However, in SimplePie 1.0 we introduced [[reference:SimplePie_Item:get_local_date]] which leverages P... , display the formatted, localized date. foreach($feed->get_items() as $item) { echo '<p>' . $item->get_title() . ' ' . $item->get_local_date('%A %e %B %Y') . '</p>'; } </code>
How do I get a thumbnail from a YouTube feed?: 24 Hits
t's simplify this with the shorter syntax. http://simplepie.org/wiki/reference/simplepie/start $feed = new SimplePie('http://you... roperly. $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 an... as a tooltip for the link. echo '<a href="' . $item->get_permalink() . '" title="' . $item->get_title
get_all_discovered_feeds(): 23 Hits
ode php><?php require_once('../simplepie.inc'); $feed = new SimplePie('http://simplepie.org/wiki/reference/simplepie/get_all_discovered_feeds'); foreach ($feed->get_... "<br />"; } ?></code> ===== See Also ===== * [[reference:SimplePie:start]] * [[reference:SimplePie:subscribe_url]]