How to put RSS feed in a webpage

Discussion in 'PHP' started by JacobNix, Feb 29, 2008.

  1. #1
    check this

    www.firoxy.info

    you see the RSS feed showing the recent activities from the source
    well thats a plugin for wordpress
    the thing i would like to know is, how to put a box like that on my other websites?!

    SOS plz
    thanks in adv
     
    JacobNix, Feb 29, 2008 IP
  2. walkere

    walkere Active Member

    Messages:
    112
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    58
    #2
    You'll need to use PHP to read the XML file (the feed), parse it, and display the links.

    Once you've read the XML file, you'll need to extract a few pieces of information.

    A feed is made up of item elements - each of which should have some child elements. The ones you'll want to find are title and link to create a list of links back to the original articles.

    If you're using PHP 5, you can use SimpleXML to read and parse the feed. You could also check out this tutorial on SimpleXML and feeds.

    If you're not using PHP 5, you'll need to find a third-party parser to do the work for you. Magpie RSS is a popular one, but I've never used it myself.

    Good luck,
    - Walkere
     
    walkere, Feb 29, 2008 IP