Hi all!
I have this problem about RSS parsing and multiple feeds..
I want to get feeds from several place and show them in one feed stream.. You can see example in
here (google feed API whit javascript).
Script what I have being using is
lastRSS and I have managed to get feeds
showing but not in same stream.. Is there way to get it done via lastRSS script or should I try other one instead?
Could saving feeds info into database be one way??
Thanks for all help and hints!! :)
Ps. below is some example of this lastRSS script what I'm using, could there be something??
Code:
<?php
function ShowOneRSS($url) {
global $rss;
if ($rs = $rss->get($url)) {
echo "<ul>\n";
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";
}
echo "</ul>\n";
}
else {
echo "Sorry: It's not possible to reach RSS file $url\n<br />";
// you will probably hide this message in a live version
}
}
// 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;
foreach ($rssall as $url) {
ShowOneRSS($url);
}
?>