Page 1 of 1

Help on RSS_PHP

Posted: Thu Feb 05, 2009 5:50 pm
by morris520
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.


Hi

I was trying to use RSS_PHP to convinience my development. But I cannot understand "The Basic RSS_PHP Object Structure" on this page. http://rssphp.net/documentation/v1/

And this is my code:

Code: Select all

<?php
 
include "../../rss_php.v1/rss_php.php";
 
echo "RSS_PHP<br>";
$rss = new rss_php;
$rss->load('http://morris520blog.spaces.live.com/feed.rss');
$items = $rss->getItems();
$items_full = $rss->getItems(true);
 
foreach ($items_full as $val){
        // Insert code here to get the title of each node ???
}
?>
 
Thanks for help


pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: :arrow: Posting Code in the Forums to learn how to do it too.

Re: Help on RSS_PHP

Posted: Thu Feb 05, 2009 5:54 pm
by pickle
What exactly is your problem?

Re: Help on RSS_PHP

Posted: Thu Feb 05, 2009 10:55 pm
by JAB Creations
Programming PHP to output RSS was a lot of fun because RSS is so lightweight! :)

Seriously, I'm almost tempted to just dump some random PHP RSS generating code. :mrgreen:

Re: Help on RSS_PHP

Posted: Fri Feb 06, 2009 12:50 pm
by morris520
First acknowledge to edit my post. I'll take a read through the rules cos I am newbie.

My question is how to retrieve data such as title, description from the rss object?

Re: Help on RSS_PHP

Posted: Sat Mar 14, 2009 12:52 am
by a.heresey

Re: Help on RSS_PHP

Posted: Sat Mar 14, 2009 1:12 am
by php_east
here is a pattern i use to parse xml/rss. it works magic for me.

Code: Select all

 
            $pattern = "#(\
i use them in regexes in preg matches.