logo
g Text Version
Beauty & Self
Books & Music
Career
Computers
Education
Family
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
Money
News & Politics
Relationships
Religion & Spirituality
Sports
Travel & Culture
TV & Movies

dailyclick
Bored? Games!
Nutrition
Postcards
Take a Quiz
Rate My Photo

new
Action Movies
Bible Basics
Houseplants
Romance Movies
Creativity
Family Travel
Southwest USA


dailyclick
All times in EST

Clairvoyance: 08:00 PM

Full Schedule
g
g ASP Site

BellaOnline's ASP Editor

g

Coding a RSS Feed - Header


It is very easy to use ASP to create a dynamic RSS feed that updates whenever you add fresh content to your site. This page helps you get the top - or header - part of the RSS file set. This is going to be the same for pretty much any RSS feed you create.

First, make sure you've set up a RSS reader to test your feed, and that you've read about the basics and printed out the sample. Those will be important so that you can test your output.

Now it's simply a matter of coding a file that is FILENAME.RSS that is set up to display your 3 latest articles or blog entries in proper RSS format.

First, the standard top area. You barely even need ASP for this part - just to put the current date into the appropriate spot.

<rss version="2.0">
<channel>
<title>YOURSITETITLE</title>
<link>YOURURLLINK</link>
<description>YOURDESCRIPTION</description>
<language>en-us</language>
<copyright>YOURCOPYRIGHT</copyright>

<%
CurrDate = Now()

CurrHour = Hour(CurrDate)
if CurrHour < 10 then CurrHour = "0" & CurrHour
CurrMin = Minute(CurrDate)
if CurrMin < 10 then CurrMin = "0" & CurrMin
CurrSec = Second(CurrDate)
if CurrSec < 10 then CurrSec = "0" & CurrSec

CurrDateT = WeekdayName(Weekday(CurrDate), TRUE) & ", " & Day(CurrDate) & " " & _
MonthName(Month(CurrDate), TRUE) & " " & Year(CurrDate) & " " & _
CurrHour & ":" & CurrMin & ":" & CurrSec & " EST"
%>
<lastBuildDate><%=CurrDateT%></lastBuildDate>
<ttl>240</ttl>
<image>
<url>YOURSITEIMAGEFILE</url>
<title>YOURSITENAME</title>
<link>YOURSITEURL</link>
</image>

-------------

Now it's time to code the meat of the RSS file, which we'll cover on a separate page to keep things easy to follow. This is in the SAME FILE - it's just explained in two parts.

RSS Feed - Body Part

Basics of a RSS Feed
RSS Feed Sample
Basic Setup of an RSS ASP File
Add Coding+a+RSS+Feed+%2D+Header to Twitter Add Coding+a+RSS+Feed+%2D+Header to Facebook Add Coding+a+RSS+Feed+%2D+Header to MySpace Add Coding+a+RSS+Feed+%2D+Header to Del.icio.us Digg Coding+a+RSS+Feed+%2D+Header Add Coding+a+RSS+Feed+%2D+Header to Yahoo My Web Add Coding+a+RSS+Feed+%2D+Header to Google Bookmarks Add Coding+a+RSS+Feed+%2D+Header to Stumbleupon Add Coding+a+RSS+Feed+%2D+Header to Reddit




RSS | Related Articles | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map


For FREE email updates, subscribe to the ASP Newsletter


Past Issues


print
Printer Friendly
bookmark
Bookmark
tell friend
Tell a Friend
forum
Forum
email
Email Editor


Content copyright © 2014 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.

g


g features
Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter


vote
Poetry
Daily
Weekly
Monthly
Less than Monthly



BellaOnline on Facebook
g


| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2014 Minerva WebWorks LLC. All rights reserved.


BellaOnline Editor