Forum Topic: Rss Feed

(98 views • 5 replies)

This topic is 1 page long.

<< < > >>
None

ecko

Reply To Post Reply & Quote

Posted at: 6/5/09 08:53 PM

ecko NEUTRAL LEVEL 02

Sign-Up: 10/08/06

Posts: 13

Hey Guys,

I am a complete noob with RSS Feeds and implementing them into my website. I have done some research and came across some parser's but they all are very limited and with ads. My goal is to implement the rss feed with php (according to research its better than javascript).

If anyone can shine some light on the how-to I would really appreciate it. More information and suggestions the better.

Thanks!


None

Jon-86

Reply To Post Reply & Quote

Posted at: 6/5/09 09:13 PM

Jon-86 NEUTRAL LEVEL 13

Sign-Up: 01/30/07

Posts: 3,860

Basically you look at how RSS feeds are formatted. And then use that to encapsulate some content, that an RSS reader can parse. A typical example is news feeds. The RSS reader would read the feed, who the title of each item in the feed, when clicked it will then display the content of that item.

PHP Main :: C++ Main :: Java Main :: irc.freenode.net

BBS Signature

None

ecko

Reply To Post Reply & Quote

Posted at: 6/5/09 09:16 PM

ecko NEUTRAL LEVEL 02

Sign-Up: 10/08/06

Posts: 13

Thanks for the insight. So what would you suggest I use to implement it into my website and have some sort of flexibility? (with no ads wither)


None

Jon-86

Reply To Post Reply & Quote

Posted at: 6/5/09 09:46 PM

Jon-86 NEUTRAL LEVEL 13

Sign-Up: 01/30/07

Posts: 3,860

Any server-side language will do since your getting this information from your server. PHP is the most accessible for the average person. You cant really use Javascript to implement the generation of an RSS feed. It will be a simple case of retrieving the content from somewhere, could be a databse or text file or whatever. Then you take this content and make it safe (meaning it doesn't contain any HTML characters that will distort the output) then output the feed in the format you choose to use placing the content in the place its supposed to be.

You can google for examples of this.

PHP Main :: C++ Main :: Java Main :: irc.freenode.net

BBS Signature

None

liljim

Reply To Post Reply & Quote

Posted at: 6/6/09 07:39 AM

liljim NEUTRAL LEVEL 27

Sign-Up: 12/16/99

Posts: 8,863

Quick and simple example for http://rss.ngfiles.com/dailytop5.xml :

<?php

$rss = new SimpleXMLElement(file_get_contents('http://rss.ngfiles.com/dailytop5.xml'));

// print_r($rss) to see details of the feed and how you might go about accessing the
// parts you're after
foreach($rss->channel->item as $item) {
	// entify these as necessary
	echo $item->title . "\n";
	echo $item->description . "\n";
}

?>
BBS Signature

None

DearonElensar

Reply To Post Reply & Quote

Posted at: 6/6/09 07:41 AM

DearonElensar LIGHT LEVEL 18

Sign-Up: 06/10/02

Posts: 1,731


All times are Eastern Standard Time (GMT -5) | Current Time: 12:48 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!