Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Sep 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP code for RSS feeds

    Hello everyone!!

    I am having one doubt that how to program RSS feeds code on my personal website? I have tried many prepared code which is available on Google search engine but still it doesn't work. If anyone have idea about that then please reply me.

    Thank you all in advance.

  • #2
    Regular Coder
    Join Date
    Sep 2011
    Posts
    128
    Thanks
    2
    Thanked 21 Times in 21 Posts
    You could get the content from the feed with a php function:
    PHP Code:
    $url "URL TO RSS FEED";
    $content file_get_contents($url);
    $xml simplexml_load_file($content); 
    Now you can use $xml as an object with all the data.

  • #3
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,531
    Thanks
    8
    Thanked 1,091 Times in 1,082 Posts
    Are you trying to "read" RSS ... meaning you want to display someone else's
    RSS on your site, or are you trying to "feed RSS" ... creating your own RSS
    feed from your website for others to read?


    .

  • #4
    Regular Coder
    Join Date
    Sep 2011
    Posts
    128
    Thanks
    2
    Thanked 21 Times in 21 Posts
    Like i read it now, he means to create a RSS feed

  • #5
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,531
    Thanks
    8
    Thanked 1,091 Times in 1,082 Posts
    Your answer in post #2 is an RSS "reader", not "feeder".
    We both think the OP means "reader".


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •