|
|
|
|
![]() ![]() |
Jan 16 2008, 05:50 AM
Post
#1
|
|
|
Premium Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 190 Joined: 21-October 05 Member No.: 13,185 |
so, how can I make RSS reader on my website? thanks in advance
|
|
|
|
Jan 16 2008, 07:05 AM
Post
#2
|
|
|
apt-get moo ![]() Group: [MODERATOR] Posts: 2,229 Joined: 28-May 05 From: Devon, England Member No.: 7,593 ![]() myCENT:17.26 |
You want to read the RSS feed from another website and put it on yours, yes?
You'll need some way to parse the XML file that makes up the RSS feed. One of the easiest ways I've found to do this is to use the Zend Framework, and more specifically the Feed Component. Of course, downloading and then uploading the Zend Framework can take a bit of time (although it is incredibly useful for loads of different things), so there is another method you can use. PHP has a collection of XML-parsing functions available. Of course, this means more manual work than using the Zend Framework. There is also a section called XMLReader which may be useful. You will need to know the format of the feed, and manually work your way through all the meta-data before moving on to the actual news items, then working through those. I don't have any code to hand, but it should be pretty easy to work out while looking at an example RSS 2.0 file to get the structure right. You'll need to get the title, link, description, etc. so people know where this feed is coming from. Then you will need to loop through each item and pull out the title, link, description and main content. |
|
|
|
Jan 16 2008, 07:09 AM
Post
#3
|
|
|
A computer once beat me at chess, but it was no match for me at kick boxing. ![]() Group: [MODERATOR] Posts: 4,298 Joined: 24-July 05 From: Linix, DOS and Windows…the good, the bad and the ugly Member No.: 9,787 ![]() myCENT:8.90 |
If you are php savvy, you might want to download a copy of the snews cms software (free) and have a look at their RSS functions.
|
|
|
|
Jan 17 2008, 02:09 AM
Post
#4
|
|
|
$p4m 0n j00 $h4m3 m3 0nc3 $p4m 0n m3 $h4m3 m3 7\/\/1c3 ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 6,784 Joined: 21-September 04 From: 9r33|\| 399$ 4|\|D 5P4/\/\ Member No.: 1,218 ![]() myCENT:1.00 |
To expand a bit on the RSS feeds a bit you can use several php software programs such as cute news, wordpress, joomla, php nuke as they have built in RSS feed fuctions to help you automate the process. Of course if you feel adventerous you can build some by scratch then check out these tutorials and stuff.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 20th November 2008 - 02:54 PM |