Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Use Rss In Php Code
.hack//GU
post 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
Go to the top of the page
 
+Quote Post
rvalkass
post Jan 16 2008, 07:05 AM
Post #2


apt-get moo
Group Icon

Group: [MODERATOR]
Posts: 2,229
Joined: 28-May 05
From: Devon, England
Member No.: 7,593
Spam Patrol
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.
Go to the top of the page
 
+Quote Post
jlhaslip
post 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 Icon

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
Spam Patrol
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.
Go to the top of the page
 
+Quote Post
Saint_Michael
post 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
T17 GFX Crew
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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. How do you test your php code(86)
  2. Php Clock(7)
  3. Get Filename Of Referring Url(8)
  4. Change Permission With Php Code(3)
  5. Adapting Html Code Embed To Work On Phpnuke(7)
  6. Dynamic Image / Signature Generator(12)
  7. Wap Source Code Viewer(4)
  8. More Dynamic ?id=browsing With Php (associative Array)(1)
  9. Display The Current Date/time(3)
  10. Use Bb Code On Your Site!(7)
  11. Some Basic Php Code Snippets For All Levels Of Experience(3)
  12. My Code Doesnt Resize Large Images, Please Help.(2)
  13. Php Education Class (first Code)(0)
  14. How To Make A Random 7 Number Code?(2)
  15. Whats Wrong>?(9)
  1. Awesome Source Code Viewer Script(7)
  2. Html Code Tester. Online Script(15)
  3. I Need Some Proof Reading For My Code Please! [resolved](7)
  4. Will This Code Work(5)
  5. Php Code(15)
  6. Php Code Needed(5)
  7. Php Code?(12)
  8. Php Code Needed Iii(10)
  9. Php And Mysql Programming(2)
  10. Malicious Code Injection(3)
  11. Php Source Code Unveiled In Browser?(7)
  12. Create Table - Mysql Code - Help(1)
  13. Php Code For Login Form With Validation In Php(6)


 



- Lo-Fi Version Time is now: 20th November 2008 - 02:54 PM