<% 'Flickr viewer Version 1.1 'Version 1.0 Intial release 'Version 1.1 Preload next photo 'Version 1.2 Added page transition 'Version 1.3 Error handling 'Set parameters here nsid="54058921%40N00" 'Flickr NSID refresh="120" 'Refresh rate in seconds on error resume next 'Get the output of the badge function url = "http://www.flickr.com/badge_code_v2.gne?count=2&display=random&size=m&layout=x&source=user&user=" & nsid set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP") xmlhttp.open "GET", url, false xmlhttp.send resp=xmlhttp.responseText set xmlhttp = nothing 'Get the image URL strpos=instr(resp,"img src=")+9 imgsrc=replace(mid(resp,strpos,instr(strpos,resp,"""")-strpos),"_m","_o") 'If we have one from the previous load in the cache, use that instead if len(session("nextimgsrc"))>0 then imgsrc=session("nextimgsrc") 'Get the next image URL strpos=instr(strpos,resp,"img src=")+9 nextimgsrc=replace(mid(resp,strpos,instr(strpos,resp,"""")-strpos),"_m","_o") session("nextimgsrc")=nextimgsrc %>
<%if len(imgsrc)>0 then%> <%else%>
There has been an error.

Either Flickr is down or the wireless signal is too weak.


Response from Flickr Server:

<%=resp%>

Error Description:

<%=err.description%>
<%end if%>