Page 1 of 1

Help - Make a RSS Feed Reader for Blogger....

Posted: Fri Jun 22, 2012 1:43 pm
by Chathula
Hello i wanta big help to make a rss Feed reader to blogger...not only to my blog..i want to add more blogs to it...

i make a RSS reader using Better php TUT..it works well..but if i add my feed url...it shows...
Fatal error: Call to a member function attributes() on a non-object in C:\xampp\htdocs\rss\core\inc\rssr.inc.php on line 14
i want to fix that or make a myown blogger reader...

as a example can anyone tell me how to make a blog reader like this...this is not in english..but in our countrey language(sri lanka) + english...
Please help me this is emergency...

this is the my error page PHP codes...
<?php

function fetch_news () {
   $data = file_get_contents('http://feeds.feedburner.com/CheaTax');
   $data = simplexml_load_string($data);
   
      $articles = array();     
   
   foreach ($data->channel->item as $item) {
        $media = $item->children('http://search.yahoo.com/mrss/');
        
       $image = array();
        
        foreach ($media->thumbnail[0]->attributes() as $key => $value) {
                $image[$key] = (string)$value;
            }     
        
        $articles[] = array(
           'title'          => (string)$item->title,
           'description'    => (string)$item->description,
           'link'           => (string)$item->link,
           'date'           => (string)$item->pubDate,
           'image'          => $image,
        
        );    
   }
      
 
   return $articles;
}

?>
Thanx for All..help me dears.....

Re: Help - Make a RSS Feed Reader for Blogger....

Posted: Sat Jun 23, 2012 11:55 pm
by Helx
Look at the error, then the line its on...
And maybe search it on Google / PHP.net
(I have no idea how to help because I've not worked with RSS)

Re: Help - Make a RSS Feed Reader for Blogger....

Posted: Sun Jun 24, 2012 2:01 pm
by Temor
I initially had no idea what was wrong but after reading a couple of other topics addressing the same issue I figured out that it is because
$media->thumbnail[0]
is empty, i.e there is no thumbnail.
Could you do a
print_r($media->thumbnail[0]);
and see what happens?

Re: Help - Make a RSS Feed Reader for Blogger....

Posted: Thu Jun 28, 2012 4:02 pm
by Chathula
I Fixed this error..it is a error of rss version...i fixed it..

i want to know can anyone give a source code for use many feed urls with publish date update...

i think it wants mysql too...can anyone help me....