Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cool11

macrumors 68000
Original poster
Sep 3, 2006
1,845
228
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?
 
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)?
 
My site contains php pages, mysql, apache server.
It is made with dreamweaver. Is is designed from scratch.
 
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.
 
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?
 
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).
 
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?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.