Welcome Guest, Not a member yet? Register   Sign In
rss problem
#1

[eluser]karloff[/eluser]
i'm trying to load my del.icio.us feed into my blog and was checking out the library in the wiki section, however i keep coming up with this error

Quote:Parse error: syntax error, unexpected ';', expecting T_PAAMAYIM_NEKUDOTAYIM in C:\xampplite\htdocs\ci\system\libraries\RSSParser.php on line 43


i took straight from the wiki, so wondering where i must have gone wrong, anyone point me in the right direction?

controller
Code:
$this->load->library('RSSParser', array('url' => 'http://test/rss/rss', 'life' => 2));
        $rss = $this->rssparser->getFeed(10);

view
Code:
<?php foreach ($rss as $item) : ?>
    <li>&lt;?=$item['title']?&gt;</li>

&lt;?php endforeach; ?&gt;
#2

[eluser]Seppo[/eluser]
The error is a sintax error inside the RSSParser.php, so the code you put is not the problem...
By the error I'm guessing you are running PHP 4 and the library requires PHP 5... if that's not it, copy the line 43 of the RSSParser.php file.
#3

[eluser]m4rw3r[/eluser]
It says that it is expecting a double colon.

I wonder why it is not called T_DOUBLE_COLON...
#4

[eluser]karloff[/eluser]
i tried the double colon but couldn't get the rssparser corrected. I am running php5.

i tried to remove the semi-colon but it then seemed to work, however not feed the info from the feed. more like some broken english nonsense... strange.

any other ideas
#5

[eluser]Seppo[/eluser]
Can you paste the code?
#6

[eluser]karloff[/eluser]
thought i would bring this one back up, sorry for the delay but other duties were called upon.

I started building a new personal site which i'm looking to integrate my feeds from lastfm and delicious, however I seem to get a blank page.

when i print_r($rss);

it is a blank array? Can anyone have a look at my code and see if i'm missing something?
Code:
controller;

      $this->load->library('RSSParser', array('url' => 'http://feeds.delicious.com/rss/theblackcat', 'life' => 2));
      //Get six items from the feed
      $data['rss'] = $this->rssparser->getFeed(10);
    $this->load->view('test_view', $data);


view;

foreach ($rss as $item) :

    echo $item['title'];
    

  endforeach;
#7

[eluser]karloff[/eluser]
i should note i'm using the rssparser from the wiki




Theme © iAndrew 2016 - Forum software by © MyBB