View Single Post
Old 06-12-2009, 04:25 AM   #2 (permalink)
jcorradino
The Contributor
 
jcorradino's Avatar
 
Join Date: Sep 2008
Posts: 36
Thanks: 2
jcorradino is on a distinguished road
Default

this is untested, but it should work (or at least get you closer to where you need to be). I set it up to use an output buffer to decide whether or not to display the list tags, and then to display them around everything else, making it look like one workflow.

Please let me know if I am way off base here, I may have misunderstood what you are looking for.

PHP Code:
<?php

function ShowOneRSS($url) {
    global 
$rss;
    if (
$rs $rss->get($url)) {
            foreach (
$rs['items'] as $item) {
                echo 
"\t<li><a href=\"$item[link]\">$item[title]</a> - <small><a href=\"$rs[link]\">$rs[title]</a></small></li>\n";
            }
    }


// include lastRSS
include "./lastRSS.php";

$rssall = array('http://applereviews.com/feed/',
                
'http://www.datacenterknowledge.com/feed/',
                
'http://feeds.feedburner.com/Woork');

// Create lastRSS object
$rss = new lastRSS;

// Set cache dir and cache time limit (1200 seconds)
// (don't forget to chmod cahce dir to 777 to allow writing)
$rss->cache_dir './temp';
$rss->cache_time 1200;
$rss->cp 'UTF-8';
$rss->items_limit 5;

ob_start();
foreach (
$rssall as $url) {
    
ShowOneRSS($url);

$buffer ob_get_contents();
ob_end_clean();

if (
$buffer!="") {
    echo 
"<ul>\n";
    echo 
$buffer;
    echo 
"</ul>\n";
} else {
    echo 
"There was a problem fetching RSS feeds."
}
?>
__________________
Jason Corradino
Applications Developer, Interactive Support - Tribune Technology
J2EE Development, Script Tinkering - Develop, Support, and Maintain Tribune websites.
jcorradino is offline  
Reply With Quote