<?php // Include the SimplePie libraryrequire_once('/feeds/php/simplepie.inc');// Create a new instance of the SimplePie object$feed = new SimplePie();// Set the feed to use$feed->set_feed_url('http://blog.spot-design.net/category/portfolio/feed/');// Initialize the feed.$feed->init();// Make sure the page is being served with the UTF-8 headers.// Read http://simplepie.org/wiki/reference/simplepie/handle_content_type to understand when to (and when NOT to) use this.$feed->handle_content_type();?><?php// Let's loop through each item in the feed.// We'll begin at the very first item, and display the following 5.foreach($feed->get_items(0, 5) as $item):?><h2><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a></h2><div class="news-date"><?php echo $item->get_date('j M Y g:i a'); ?></div><div class="news-story"><?php echo $item->get_content(); ?></div><?php endforeach; ?><p>Displaying <?php echo $feed->get_item_quantity(); ?> most recent entries from Portfolio Category feed from my blog: <a href="http://blog.spot-design.net">Blogging Life as it Comes</a>.</p>