Reputation: 763
I made an RSS reader using Zend's Zend_Feed_Rss object. It worked fine for me (with feed 1) but our tester found out that it wont return a title on feed 2 (see below).
http://rss.slashdot.org/Slashdot/slashdotScience
<?php
//...
if($setUp){
try{
$feed = Zend_Feed::import($this->options['feed_url']);
}catch(Exception $e){
$setUp = false;
$this->view->errorMsg = $this->lang['wrongRss'];
}
}
if($setUp){
$this->view->feed = $feed;
$wTitle = $feed->title();
if($this->title != $wTitle){
$this->title = $wTitle;
}
}
//...
?>
Both $feed->title and $feed->title() do not work on feed 2.
Zend_Feed_Rss object doesn't have any other methods or properties to get the title from. Who knows whats going wrong?
Edit: Stupid of me to not properly check the rss feed. It's an rdf feed thats not working. The entries are fetched ok, so the only thing that's not working is the title. How can I get the title from the rdf feed? Zend's feed object only seems to support rss and Atom.
Upvotes: 0
Views: 119