Display a RSS feed in a static php page.

7 replies
  • WEB DESIGN
  • |
Hello

I am building a website in php and I would like to add some rss feeds to my site. It will be one different feed per page. I would like to know please how would I display the feed from a RSS url in a php web page. I have searched on the internet for hours and tried every script and tutorial and all I get is errors. I would like to host it on my server as 3rd party services I have forund sometimes to be unreliable and use javascript which is what I am not looking for.

Also I would like to cache the feeds to make it easier on the shared hosting server.

A final thing I would like to do is to show the feed split up into different sections like for example page 1 -2 -3 etc I think it is called pagenation or something like that.

Thanks all for your help in advance
#display #feed #page #php #rss #static
  • Profile picture of the author anestbaik
    Originally Posted by webmasteruk View Post

    Hello

    I am building a website in php and I would like to add some rss feeds to my site. It will be one different feed per page. I would like to know please how would I display the feed from a RSS url in a php web page. I have searched on the internet for hours and tried every script and tutorial and all I get is errors. I would like to host it on my server as 3rd party services I have forund sometimes to be unreliable and use javascript which is what I am not looking for.

    Also I would like to cache the feeds to make it easier on the shared hosting server.

    A final thing I would like to do is to show the feed split up into different sections like for example page 1 -2 -3 etc I think it is called pagenation or something like that.

    Thanks all for your help in advance
    it is easy,
    use MAGPIE
    Magpie RSS - PHP RSS Parser
    {{ DiscussionBoard.errors[3096093].message }}
  • Profile picture of the author otherwhirl
    Hi, if you find a solution plz post it here.

    Thanks!

    Originally Posted by webmasteruk View Post

    Hello

    I am building a website in php and I would like to add some rss feeds to my site. It will be one different feed per page. I would like to know please how would I display the feed from a RSS url in a php web page. I have searched on the internet for hours and tried every script and tutorial and all I get is errors. I would like to host it on my server as 3rd party services I have forund sometimes to be unreliable and use javascript which is what I am not looking for.

    Also I would like to cache the feeds to make it easier on the shared hosting server.

    A final thing I would like to do is to show the feed split up into different sections like for example page 1 -2 -3 etc I think it is called pagenation or something like that.

    Thanks all for your help in advance
    {{ DiscussionBoard.errors[3096939].message }}
  • Profile picture of the author SteveJohnson
    This will get you the basics: Free RSS to HTML PHP Script
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[3101104].message }}
  • Profile picture of the author kevintruong
    have you ever try with this ? <?php bloginfo('rss2_url'); ?>
    {{ DiscussionBoard.errors[3110440].message }}
    • Profile picture of the author phpbbxpert
      Originally Posted by kevintruong View Post

      have you ever try with this ? <?php bloginfo('rss2_url'); ?>
      That will get you nothing but an undefined function unless it is used in WordPress and even then it will only give you the URL to the blogs feed.


      To the Op, most RSS feed reader scripts don't include cacheing, so you will most likely need to go custom on this and maybe even pay to have it developed.

      If you spend enough time looking I suppose something might be found but I doubt it. Most developers now days including myself just write a script to collect feeds we want.

      Writing classes that do any RSS feed are a bit trickier because some feeds change tag names or don't follow standards which can force dealing with extra error handling or tags, etc....
      {{ DiscussionBoard.errors[3111450].message }}

Trending Topics