how to display rss feeds on webpage

Discussion in 'HTML & Website Design' started by mickscool, Jul 7, 2007.

  1. #1
    Hi Friends,
    I have a website and I want to display RSS feeds on the homepage of my website.I did some research on how to do this and got some success using "RSS2HTML" php script.

    But usually they give me a url like this:
    http://www.rss2html.com/rss2html.ph...FILE=http://rss.news.yahoo.com/rss/topstories

    And on the homepage I make a link to that URL and everything works fine.But I want to display the RSS feeds on the homepage itself,so can someone tell me how to do this???

    Do I need to use frames and embed that page?? I do not want to use frames...is there any other way..how to people display rss feeds on their websites...

    Please help..
    Thanks
     
    mickscool, Jul 7, 2007 IP
  2. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you're using PHP (which I presume you are), I have a script that deathshadow (another member here) wrote for me last year you can use (I checked with him last year, he said it was ok to give to other people as long as I attribute him as the author).

    I just have one question for you. Are you using an HTML or XHTML DOCTYPE in your Web site?

    What the parser I have does is simple. It takes a feed, creates a local cached copy of it every hour, then parses the cached copy of the feed whenever the page requesting the script is loaded. This saves a lot of bandwidth on the host site's server and can also improve your own site's download speeds since the feed is already stored on the server (instead of another server - the fewer servers "shaking hands" the better).
     
    Dan Schulz, Jul 7, 2007 IP
  3. WallaceYeung

    WallaceYeung Notable Member

    Messages:
    3,377
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    230
    Digital Goods:
    1
    #3
    WallaceYeung, Jul 7, 2007 IP
  4. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No offense, but Magpie is a bloated piece of crap. On top of using more PHP code than necessary (yes, I'm a coding minimalist) it's also going to ping EACH host server EVERY time a feed is requested. That's a BAD idea, and can also cause the time it takes to render and send the Web page to the browser to INCREASE due to all the hand-shaking (and holding) the parser has to do with every server that it's trying to pull a feed from.

    If you have the parser trying to grab 50 different feeds from 50 different servers for 50 separate requests at the exact same time, well I hope you can see the problem because if not you'll definatley have plenty of time to figure it out.
     
    Dan Schulz, Jul 8, 2007 IP
  5. iWonder

    iWonder Member

    Messages:
    94
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    48
  6. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #6
    How to add hyper text a word in the editor":rolleyes:

    sounds goofy but im at one of those original forums where you have to add in the text then ad the url" all im trying to do here is turn this text> coffee recipies into a url

    any comments anyone? but this editor is different from the dp dosent let you highlight and then click ad url.

    this one is like when you click the add link button it only ads the Coffee Recipe to it any clue and when I add in the url instead of hyper linking the words it add the url and the words like this Googlehttp://www.google.com and the link works but it is attached to the word it should have hyper linked? help anyone
     
    Aaron111, Jul 8, 2007 IP
  7. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #7
    try this:
    [url =http://www.linktowebsite.tld]Your Link Text[/url] but without a space between url and the equal sign.
     
    Dan Schulz, Jul 8, 2007 IP
  8. sparckyz

    sparckyz Peon

    Messages:
    336
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Can use a simple PHP script and a little a PHP program called Magpierss. Worked for me :).
     
    sparckyz, Jul 8, 2007 IP
  9. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Did you read what I said about Magpie?
     
    Dan Schulz, Jul 8, 2007 IP
  10. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #10
    thank you dan but It still did not work" I pm you the error? did you receive?
     
    Aaron111, Jul 8, 2007 IP
  11. mickscool

    mickscool Active Member

    Messages:
    373
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #11
    Hi Guys,
    Thanks for the advice....Dan i will try to PM you and request you to send that script....after reading your note on magpie,I just got some doubts,would appreciate if anyone can help:

    1.If I show RSS feeds on my homepage,does that means loading the feeds will take some cycles and overall response time for the end-user would increase propotionately??
    2.Does RSS feeds lower your PRs or affect your site to be spidered,because the robots will notice the content is coming from some other place???

    I am using Joomla CMS,so all the site is in PHP.

    Thanks
     
    mickscool, Jul 9, 2007 IP
  12. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #12
    Hey Dan S

    thanks for all the help well appreciated and documented as well" keep up the savvyness and inclusions rep added;)
     
    Aaron111, Jul 9, 2007 IP
  13. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Re #1 - It can. But the one I'm going to give you will create a copy of the feed onto your server that it can use whenever the page is requested (refreshed hourly for new content). By grabbing the cached copy of the feed the parser I'm going to give you will save, you can literally cut down on the "hand shaking" that servers will have to do in order to get the feeds out. Oh, and it'll also save the host servers a LOT of bandwidth consumption, which I'm sure the publishers will thank you for (even if they do so quietly).

    Re #2 - Not really. The spiders only see the HTML. They don't see ANY of the PHP. What may happen is that the index may recognize the content being from another source and flag it for human review. If that happens, I'm sure the person will realize it's just news or other "syndicated" content and not penalize you. If you're republishing a blog entry via RSS you very well mgiht get slapped for it.
     
    Dan Schulz, Jul 9, 2007 IP
  14. mickscool

    mickscool Active Member

    Messages:
    373
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #14
    Thanks a lot Dan,
    Yeah you can send the script whichever way you wish..just let me know where to grab it from..

    Cheers
     
    mickscool, Jul 9, 2007 IP
  15. Aaron111

    Aaron111 Well-Known Member

    Messages:
    4,301
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    185
    #15
    Dan Schulz are you a fan of rss & xml :rolleyes:
     
    Aaron111, Jul 9, 2007 IP
  16. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Just RSS. I'm not too fond of XML in general, since it's often touted as a language when it's really used best as a data storage/transfer format.
     
    Dan Schulz, Jul 9, 2007 IP
  17. mickscool

    mickscool Active Member

    Messages:
    373
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    58
    #17
    Hi Dan,
    I am still awaiting for that php script..can you please tell me when can you send it...
    thanks
     
    mickscool, Jul 11, 2007 IP
  18. Dan Schulz

    Dan Schulz Peon

    Messages:
    6,032
    Likes Received:
    437
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Later today. :)

    I'm just tying up some loose ends at home real quick.
     
    Dan Schulz, Jul 11, 2007 IP
  19. DynamicMK

    DynamicMK Peon

    Messages:
    132
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #19
    And can you tell how can I add php sctipt in html site. I need to put RSS Feeds on my site but I dont like the java one.
     
    DynamicMK, Jul 25, 2007 IP
  20. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #20
    http://battletech.hopto.org/for_others/rss/

    That's what dan's referring to.

    There are .txt copies in their to make viewing/downloading the source simple. I put the code that splits the feed and handles caching in a separate file from the one that outputs the feed, meaning it's simple to reskin the output's html without risking damaging the code that provides the actual functionality.

    http://battletech.hopto.org/for_others/rss/rss_read.php.txt - the actual RSS parser.

    http://battletech.hopto.org/for_others/rss/rss_skin.php.txt - the code to output the RSS feed as HTML

    http://battletech.hopto.org/for_others/rss/test.php.txt - an example 'test' output.

    http://battletech.hopto.org/for_others/rss/test.php - see it in action here.

    You can create an array of feeds to parse in one fell swoop, or you can create them one at a time.

    Very simple, and reasonably fast. The time it caches is not just an hour either, you can actually set any amount of time you want for each feed.

    Letting the server sit there hanging waiting on contacting other servers, ESPECIALLY if you are doing more than one can quickly overload the system and reduces the number of available connects for too long. Caching the feeds for a certain amount of time and not bothering to go off-server during that time reduces the overhead to bupkis.

    It's not as full featured as some other parsers, but it's lean and low overhead which was more important given what I was using it for.
     
    deathshadow, Jul 25, 2007 IP