Speaking of Magpie! (-;
I was looking for some help and couldn’t find it on Magpie’s site or elsewhere so perhaps somone from this forum would have a fix?!
I too am using Magpie to display a feed on my PMPro Site and it works fine with Magpie. But, I am trying to include another feed on the SAME page and it isn’t displaying.
My current Magpie code (that works) looks like:
<?php
include(’./mag/magpierss/rss_fetch.inc’);// Set error reporting for this
error_reporting(E_ERROR);// Fetch RSS feed
$rss = fetch_rss(‘http://blog.searchenginewatch.com/blog/blog.xml’);
if ($rss)
{
// Split the array to show first 10
$items = array_slice($rss->items, 0, 10);
// Cycle through each item and echo
foreach ($items as $item )
{ echo ‘<a href=”’.$item[‘link’].’”>’.$item[‘title’].’</a> - ‘.$item[‘author’].’<br />’;
echo “<b>Publish Date: ” . $item[pubdate] . “</b><br>\n”;
echo $item[ description ] . “</p>” ;
}}else { echo ‘<h2>Error:</h2><p>’.magpie_error().’</p>’;}// Restore original error reporting value@ini_restore(‘error_reporting’);?>
But if I copy/paste the same code for my 2nd Feed I get an error and it doesn’t display.
I was wondering if there was something simple like in the area where it says:
$rss = fetch_rss('http://blog.searchenginewatch.com/blog/blog.xml');
Couldn’t one put two(2) urls there? Anyone using Magpie to display 2 feeds? If so..can you share your code?
Thanks.
-P