0

and thanks in advance for your help. I'm using Simplepie to try to bring this feed:

http://www.p2rx.org/webservices/rssNews.cfm?Type=Tribal&getall=true

into this page:

http://www.tribalp2.org/events/news.php

As you can see, it isn't working. Although many other feed urls I've entered into:

$feed->set_feed_url('http://www.p2rx.org/webservices/rssNews.cfm');

work just fine. I've added

$feed->force_feed(true);

as well. What might the problem be? The full code is:

<?php
require_once('../php/autoloader.php');
$feed = new SimplePie();
$feed->set_feed_url('http://www.p2rx.org/webservices/rssNews.cfm?Type=Tribal&getall=true');
$feed->force_feed(true);
$feed->init();
$feed->handle_content_type();
?>

<?php foreach ($feed->get_items(0,30) as $item): ?>
    <div class="item">
        <h4><a href="<?php echo $item->get_permalink(); ?>"><?php echo $item->get_title(); ?></a> - <?php echo $item->get_date('F j, Y'); ?></h4>
        <p><?php echo $item->get_description(); ?></p>
    </div>
<?php endforeach; ?>
<?php unset($feed); ?>

Thanks.

MaryS
  • 1
  • 2

1 Answers1

0

SimplePie can not display all feeds. There are crap feeds that do not follow the standards and even if you try to force it, SimplePie can not decipher them. However checking http://validator.w3.org/feed/ your feed validates.

Try not forcing feed, also try calling force feed after init. If the feed validates SimplePie should handle it.

Muskie
  • 577
  • 3
  • 21