Showing posts with label RFC822 date. Show all posts
Showing posts with label RFC822 date. Show all posts

Wednesday, 4 May 2011

RSS Feed: How to create custom feeds (part 2)

   


In the previous part we have introduced the basics for the creation of custom RSS feeds. We ended the article creating the xml object and we were ready to write down the feed itself. Please, before going on here, see the first article if you haven't, otherwise you won't understand the following explanations.

The  Feed
First of all, we start creating the head of the feed. Just for explanatory purpose, let me say that a feed needs some basic elements:
1) a version;
2) a title;
3) a ttl (time to live);
4) a language;
5) if you like, a copyright statement;
6) a publishing date.

Monday, 2 May 2011

RSS Feed: How to create custom feeds (part 1)

   


This is the first of a two parts article about creating custom RSS feeds. It might be a complex task in terms of coding, however the logic behind it is not that difficult to understand. I decided to divide it in two, so that I can explain it in depth.

Some assumptions must be made before starting with the creation of the page.
1) We have a database from which we fetch data for the feed. We assume the resulting recordset is called RS (as we always do in our examples).
2) In the root directory of our web site, there's a folder called "rss" where we are going to write the feed (xml file). The folder must have read and write permissions.
3) The page used to create the feed is an asp page with VBScript as programming language.
4) The feed is generated by opening the above asp page. Thus the creation of the feed is not automatic. Anyway, it could be integrated at the end of a data inserting process, so that every time a new item is inserted or updated in the database, the asp page is run (and the related xml file created).