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

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

new
Ethnic Beauty
Adolescence
Middle Eastern Culture
Yoga
Vision Issues
Paper Crafts
Comedy Movies


dailyclick
All times in EST

Low Carb: 8:00 PM

Full Schedule
g
g ASP Site
Editor Wanted
BellaOnline's ASP Editor

g

Coding a RSS Feed - Header
Guest Author - Lisa Shea

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

This site needs an editor - click to learn more!

RSS | Related Articles | Previous Features | Site Map

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


Content copyright © 2009 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 BellaOnline Administration for details.

g


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

g features
Best uses for RSS

RSS and its future.

Force Download Dialog box with ASP

Archives | Site Map

forum
Forum
email
Contact

Past Issues
memberscenter

jobs
what
job title, keywords
where
city, state or zip
jobs by job search


vote
Growing a Garden
Veggies and Flowers
Veggies Only
Flowers Only
No Garden

g


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


BellaOnline Editor