"; //print_r($rs); //echo ""; echo "

" . $rs[title] . "

\n"; echo $rs[description] . "
\n"; foreach ($rs['items'] as $item) { echo "

" . $item['title'] . "
" .html_entity_decode($item['description']). "

\n"; } if ($rs['items_count'] <= 0) { echo "Sorry, no items found in the RSS file :-("; } } else { echo ""; } */ define(RSSCACHE_TIME, 3600); // one hour, NEVER set this lower than 1200 (20 minutes) - webmasters will hate you otherwise. define(RSSCACHE_PATH, trailingslashit( ABSPATH . '/wp-content/aggrss-cache') ); function initAggrss() { global $lastRSS; require_once(dirname(__FILE__) . '/lastRSS/lastRSS.php'); if ( !file_exists(RSSCACHE_PATH) ) : if ( is_writable( dirname(RSSCACHE_PATH) ) ) $dir = mkdir( RSSCACHE_PATH, 0777); else die("Your cache directory (" . RSSCACHE_PATH . ") needs to be writable for this plugin to work. Double-check it. Deactivate the aggrss plugin."); endif; // create lastRSS object $lastRSS = new lastRSS; // setup transparent cache $lastRSS->cache_dir = RSSCACHE_PATH; $lastRSS->cache_time = RSSCACHE_TIME; // $lastRSS->date_format = 'U'; } add_filter('wp_head', 'initAggrss'); function aggrss($rssurl,$striptags=false,$num=0) { global $lastRSS; $lastRSS->CDATA= ($striptags) ? "strip" : "content" ; $lastRSS->items_limit=$num; if ($aggr = $lastRSS->Get($rssurl)) return $aggr; else return 0; } ?>