Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*=======================================================================
- Nuke-Evolution Xtreme: Enhanced PHP-Nuke Web Portal System
- =======================================================================*/
- if (!defined('MODULE_FILE')) {
- die('You can\'t access this file directly...');
- }
- //
- // Set the RSS feed values
- //
- $url = 'http://www.guildwars2.com/en/rss.xml';
- $feed = '';
- $limit = 10;
- $count = 0;
- include_once(NUKE_BASE_DIR . 'header.php');
- OpenTable();
- // Open the RSS feed
- if (($rss = simplexml_load_file($url)) !== false) {
- // Get the feed items
- $items = $rss->channel->item;
- if (sizeof($items > 0)) {
- foreach ($items as $item) {
- if ($count === $limit) {
- continue;
- }
- $feed .= '<h3><a href="' . $item->link . '">' . $item->title . '</a></h3>';
- $feed .= '<span class="gensmall">( ' . $item->pubDate . ' )</span>';
- $feed .= '<p>' . $item->description . '</p>';
- // Increment the total count
- $count++;
- }
- }
- } else {
- $feed = '<div style="text-align: center;">Unable to connect to the RSS feed!</div>';
- }
- echo $feed;
- CloseTable();
- include_once(NUKE_BASE_DIR . 'footer.php');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement