Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!--- Use cffeed to READ an RSS feed (CF8 and up) --->
- <cftry>
- <cffeed action="read" source="http://path.to/feed" query="rsFeed">
- <cfcatch type="any"><!--- An error occurred --->
- <cfset rsFeed = "">
- </cfcatch>
- </cftry>
- <!--- Use cfdump to display the result xml to fine tune what you want to output --->
- <cfdump var="#rsFeed#">
- <!--- Use this to output the resulting feed wherever you want --->
- <cfif isQuery(rsFeed)>
- <cfoutput query="rsFeed"><p>
- <a href="#rsFeed.rssLink#">#rsFeed.Title#</a><br />
- <small class="nowrap">#DateFormat(rsFeed.PublishedDate, 'mmm d, yyyy')#</small>
- </p>
- </cfoutput>
- <cfelse>
- <p>Feed is temporarily unavailable.</p>
- </cfif>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement