Our online blog

Posts Tagged ‘coldfusion reading RSS’

Using Coldfusion tag: CFFEED

Friday, March 6th, 2009

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.