Using the ‘cffeed’ allows you to read any websites RSS feed and display it within your coldfusion page. The ‘cffeed’ tag is a very easy tag to use and can be very handy when building a RSS display website.

Code to be placed at the top of .cfm page:

<cffeed action=”read” source=”http://www.hostmediauk.com/blog/?feed=rss2″ name=”myRSSFeed”>

Code to be placed within the <body> tags:

<cfloop from=”1″ to=”#ArrayLen(myRSSFeed.item)#” index=”i”>

<cfoutput>
#myRSSFeed.item[i].description.value#<br />
</cfoutput>

</cfloop>

You can view this working on our Coldfusion 8 servers in the UK at:
http://www.hostcoldfusion.co.uk/

Enjoy using RSS feeds on your website.

Leave a Reply

Your email address will not be published. Required fields are marked *

About Host Media

We have been hosting websites since 2002 and are always moving forward. All articles written under the Host Media author are created by the team who support our customers.

Category

Server Scripting

Tags

, , , , , , ,