<% ' =========== Flickr RSSASP ========== ' Bricke.NET ' Based on http://www.bytescout.com/how_to_display_rss_using_asp.html ' =============================================== ' =========== configuration ===================== ' ##### URL to Flickr RSS Feed to display ######### Tag = "Bricke" User = "95909252@N00" URLToRSS = "http://flickr.com/services/feeds/photos_public.gne?id=" & User & "&tags=" & tag & "&format=rss_200" ' ##### max number of displayed items and columns##### MaxNumberOfItems = 17 MaxNumberOfColumns = 4 ' ##### Main template constants MainTemplateHeader = "" MainTemplateFooter = "
" ' ##### ' ##### Item template. ' ##### {LINK} will be replaced with item link ' ##### {TITLE} will be replaced with item title ' ##### {DESCRIPTION} will be replaced with item description ' ##### {THUMB} will be replaced with attribute url of item media:thumbnail ItemTemplate = "{TITLE}

{DESCRIPTION}" ' ##### Error message that will be displayed if not items etc ErrorMessage = "Error has occured while trying to process " &URLToRSS & "
Please contact web-master" ' ================================================ Set xmlHttp = Server.CreateObject("MSXML2.XMLHTTP.3.0") xmlHttp.Open "Get", URLToRSS, false xmlHttp.Send() RSSXML = xmlHttp.ResponseText Set xmlDOM = Server.CreateObject("MSXML2.DomDocument.3.0") xmlDOM.async = false xmlDOM.LoadXml(RSSXML) Set xmlHttp = Nothing ' clear HTTP object Set RSSItems = xmlDOM.getElementsByTagName("item") ' collect all "items" from downloaded RSS Set xmlDOM = Nothing ' clear XML RSSItemsCount = RSSItems.Length-1 ' writing Header if RSSItemsCount => 0 then Response.Write MainTemplateHeader End If j = -1 y = 0 For i = 0 To RSSItemsCount Set RSSItem = RSSItems.Item(i) for each child in RSSItem.childNodes Select case lcase(child.nodeName) case "title" RSStitle = child.text case "link" RSSlink = child.text case "description" RSSdescription = child.text RSSdescription = mid(RSSdescription, InStrRev(RSSdescription,"

")+3, Len(RSSdescription)-3) case "media:thumbnail" RSSThumb = child.getAttribute("url") End Select next j = J+1 y = Y+1 if J" y = 0 end if Next ' writing Footer if RSSItemsCount => 0 then Response.Write MainTemplateFooter else Response.Write ErrorMessage End If ' Response.End ' uncomment this line if you need to finalize output %>