Creation of rss feeds - the simple way

Discussion in 'Web Design and Development' started by cool11, May 18, 2007.

  1. cool11 macrumors 65816

    cool11

    Joined:
    Sep 3, 2006
    #1
    I want to create rss feeds for a site but I do not know where to start and how to find an easy way.
    Of course I searched google.
    I saw about applications that create rss feeds, I saw about online services like www.feedburner.com, I discovered dreamweaver extensions (http://www.webreference.com/programming/rss_feeds/ ) and many other related things.
    Still I do not know how to do it better. What step should I do.

    Can you please tell me a simple way to do it?

    Any help?
     
  2. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #2
    How is your site set up? Is it static HTML or is there some software generating the pages? Did you write the site from scratch or are you basing on some existing blog or CMS or whatever software (and if yes, which one)?
     
  3. cool11 thread starter macrumors 65816

    cool11

    Joined:
    Sep 3, 2006
    #3
    My site contains php pages, mysql, apache server.
    It is made with dreamweaver. Is is designed from scratch.
     
  4. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #4
    All right then, so you have direct access to the content and don't have to use workarounds. I'll try to make the process a little less mysterious.

    An RSS feed is, when you ignore some details, just a plain old web page like any other (it's not HTML, but let's ignore that for the moment). All an RSS reader does is refresh a Web page from time to time and parse the contents. This means that you can create your RSS feed as a simple text file on your Web server that gets replaced whenever the site updates, or if you prefer you can generate the content on the fly from your database, just as you would with ordinary Web pages.

    You may be just fine rolling your own RSS, much of the text is the same for every feed (and every entry in every feed), all you need to do programmatically is fill in the text inside the tags. The date formats are standard, and for description and content fields the escaping is the same old routine you're probably familiar with from generating HTML pages.

    Armed with the RSS spec and looking at others' feeds (the examples at Teh Wiki are probably as good as anything), it shouldn't be bad to build up the channel section and loop through the latest database entries to build up the item entries. It's really a text substitution job; the feed format is predefined, so you don't need to get involved with a full-blown XML generator or anything like that if you don't want to.
     
  5. cool11 thread starter macrumors 65816

    cool11

    Joined:
    Sep 3, 2006
    #5
    Thanks for your response. I just start to understand it.

    I have some questions.

    How do I create it?
    Online service? Dreamweaver extension? Third-party application?

    I had constructed a minimal wap page in the past. It was based in the standard php pages. Once I did it, I did not had to make anything else then.

    Is this the same case with rss? Will I do it once and it will run automatically? Or I will have to make posting everytime I have new content?
     
  6. iMeowbot macrumors G3

    iMeowbot

    Joined:
    Aug 30, 2003
    #6
    Sorry for writing in such general terms, but of course I don't know how your site is built, so it has to be that way :/

    You can generate updated feed files periodically so that RSS clients read a static page, or you can generate them dynamically. What makes sense really depends on how your site is set up.

    Does your site already have, for example, a front page that lists all the new entries? You should be able to borrow that code to create your RSS generator. If the site is typical, you will be looping through the content entries in exactly the same way. All you are really doing for RSS is leaving out the HTML formatting stuff, and instead printing out XML tags.

    If you are simply looking for a little helper library, Google will turn up some prewritten PHP classes (one example).
     
  7. cool11 thread starter macrumors 65816

    cool11

    Joined:
    Sep 3, 2006
    #7
    The main pages of the site, which is a news portal, is two:
    one that displays the titles of the news, and one generic page that display each article separately. If you know about master-detail pages of dreamweaver you know what I mean.

    So, I can imagine the rss would be something about news titles and the main body of articles. Am I right?

    I want to make the whole process to run automatically, without me. Just set it up, and the work all alone(like the wap page I said before-it pulled the news from the main site-no need to update something about the specific wap page).
    Can I make it unattended? How can I do it?

    I saw the link you provided. Is it a script that works unattended? I also found http://www.phpclasses.org/browse/package/1820.html
    I will subscribe to download it, but can you tell me if you think it suits my needs as I described them?
     

Share This Page