Forum Moderators: open
All members' feed URL is storing in the mySQL database from the field "FEEDRSS". Some are empty.
I would like to create a page that use MagpieRSS to read all the feed URL from "FEEDRSS" and listed down all the new posts, is it possible?
Thank you very much for helping!
{php}
//Include our magpie functions
require_once('magpierss/rss_fetch.inc');
//define our cache directory so we can cache the feed
define('MAGPIE_CACHE_DIR', 'cache/');
//set up our URL..much simplified in this case
$url = $this->get_template_vars('RSSFEED');
//get our feed
$rss = fetch_rss( $url );
$num_items = 5;
$rss->items = array_slice($rss->items, 0, $num_items);
//If we got a feed, let's process it
if ( $rss ) {
//Loop through all the items in the feed...
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$desc= strip_tags($item['description']);
if (strlen($desc) >= 256)
{
$desc = substr($desc,0,255)." [...]";
}
//And print them
echo "<b><a href=$href>$title</a></b><br/>$desc<br/><br/>";
}
}
{/php}
<snip>
However, I can only read ONE rss url (one website).
I want to read ALL URLs and parse the output into a page, sort via post date.
[edited by: werty at 6:44 pm (utc) on Mar. 9, 2008]
[edit reason] Removed URL, please see TOS #13 [/edit]