enable_xml_dump(isset($_GET['xmldump']) ? true : false); } // Allow us to change the input encoding from the URL string if we want to. (optional) if (!empty($_GET['input'])) { $feed->set_input_encoding($_GET['input']); } // Allow us to cache images in feeds. This will also bypass any hotlink blocking put in place by the website. if (!empty($_GET['image']) && $_GET['image'] == 'true') { $feed->set_image_handler('http://spot-design.net/fanlists/feeds/handler_image.php'); } // When we set these, we need to make sure that the handler_image.php file is also trying to read from the same cache directory that we are. $feed->set_favicon_handler('http://spot-design.net/fanlists/feeds/handler_image.php'); // Initialize the feed. $feed->init(); // How many items per feed should we try to grab? $items_per_feed = 5; // As long as we're not trying to grab more items than the feed has, go through them one by one and add them to the array. for ($x = 0; $x < $feed->get_item_quantity($items_per_feed); $x++) { $first_items[] = $feed->get_item($x); } // Make sure the page is being served with the UTF-8 headers. $feed->handle_content_type(); ?>
Displaying get_item_quantity(); ?> most recent entries from Portfolio Category feed from my blog: Blogging Life as it Comes.