Help on RSS_PHP

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
morris520
Forum Commoner
Posts: 60
Joined: Thu Sep 18, 2008 8:56 pm
Location: Manchester UK

Help on RSS_PHP

Post 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.
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Help on RSS_PHP

Post by pickle »

What exactly is your problem?
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: Help on RSS_PHP

Post 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:
User avatar
morris520
Forum Commoner
Posts: 60
Joined: Thu Sep 18, 2008 8:56 pm
Location: Manchester UK

Re: Help on RSS_PHP

Post 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?
User avatar
a.heresey
Forum Commoner
Posts: 59
Joined: Wed Dec 13, 2006 7:31 pm
Location: Chesapeake, VA, US

Re: Help on RSS_PHP

Post by a.heresey »

User avatar
php_east
Forum Contributor
Posts: 453
Joined: Sun Feb 22, 2009 1:31 pm
Location: Far Far East.

Re: Help on RSS_PHP

Post 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.
Post Reply