<% Option Explicit Response.Buffer = true Response.ExpiresAbsolute = Now () - 1 Response.Expires = 0 %> <% '----------------------------------------------------------------------------- ' ' ' ' ' '-------------------------------------------------------------------------------- %> <% ' Variables Dim myRSSURL, myRSSDocument, myNews, mychannelNodes, entry, myChannelTitle, myChannelLink, myChannelDescription, myBase, myitemNodes, item, myitemTitle, myitemLink, myitempubDate, myitemDescription ' get RSS Address e.g : http://www.mysite.com/ASPRSSReader.asp?rssurl=http://www.rsssite.com/rssfile myRSSURL=request("rssurl") if Len(myRSSURL)=0 then ' Change with your default RSS URL myRSSURL = "http://fr.audiofanzine.com/news/partenaires/rss.xml" end if ' Load RSS file set myRSSDocument = createObject("Msxml.DOMDocument") myRSSDocument.async = false myRSSDocument.setProperty "ServerHTTPRequest", true myRSSDocument.load(myRSSURL) ' Check if it 's loaded If (myRSSDocument.parseError.errorCode <> 0) then ' Save error in myNews for displaying myNews = "XML error: " & myRSSDocument.parseError.reason ' Continue if OK Else 'Get elements set mychannelNodes = myRSSDocument.selectNodes("//channel/*") for each entry in mychannelNodes ' Normaly one Channel if entry.tagName = "title" then myChannelTitle = entry.text elseif entry.tagName = "link" then myChannelLink = entry.text elseif entry.tagName = "description" then myChannelDescription = entry.text ' Save all in myBase for displaying myBase = myBase & "" & myChannelTitle & "" end if next ' next element ' Get elements set myitemNodes = myRSSDocument.selectNodes("//item/*") For each item in myitemNodes if item.tagName = "title" then myItemTitle = item.text elseif item.tagName = "link" then myItemLink = item.text elseif item.tagName = "pubDate" then myItempubDate = item.text elseif item.tagName = "description" then myItemDescription = item.text ' Save all in myNews for displaying myNews = myNews & myItemDescription myNews = myNews & "
" end if next ' Next element ' Liberate Nodes set mychannelNodes = nothing set myitemNodes = nothing End If ' if no error %> Matériel de Musique news, nouveautés logiciels musicaux, actus mobiles, infos sur portables i-cone.net plateforme musicale pour mobiles SmartPhone et PDA
Retour à l'accueil

<% Function googleColor(value, random) Dim colorArray colorArray = Split(value, ",") googleColor = colorArray(random Mod (UBound(colorArray) + 1)) End Function Dim googleTime, googleDt, googleScheme, googleHost googleTime = DateDiff("s", "01/01/1970 00:00:00", Now()) googleDt = (1000 * googleTime) + Round(1000 * (Timer - Int(Timer))) googleScheme = "http://" if StrComp(Request.ServerVariables("HTTPS"), "on") = 0 Then googleScheme = "https://" googleHost = Server.URLEncode(googleScheme & Request.ServerVariables("HTTP_HOST")) Dim googleAdUrl, googleAdOutput googleAdUrl = "http://pagead2.googlesyndication.com/pagead/ads?" &_ "ad_type=text" &_ "&channel=3342463488" &_ "&client=ca-mb-pub-3492163829871367" &_ "&color_border=" & googleColor("804000", googleTime) &_ "&color_bg=" & googleColor("EEEEEE", googleTime) &_ "&color_link=" & googleColor("6F3C1B", googleTime) &_ "&color_text=" & googleColor("000000", googleTime) &_ "&color_url=" & googleColor("804000", googleTime) &_ "&dt=" & googleDt &_ "&format=mobile_double" &_ "&host=" & googleHost &_ "&ip=" & Server.URLEncode(Request.ServerVariables("REMOTE_ADDR")) &_ "&markup=xhtml" &_ "&output=xhtml" &_ "&ref=" & Server.URLEncode(Request.ServerVariables("HTTP_REFERER")) &_ "&url=" & googleHost & Server.URLEncode(Request.ServerVariables("URL")) &_ "&useragent=" & Server.URLEncode(Request.ServerVariables("HTTP_USER_AGENT")) Set googleAdOutput = Server.CreateObject("MSXML2.ServerXMLHTTP") googleAdOutput.Open "GET", googleAdUrl, false googleAdOutput.Send Response.Write(googleAdOutput.responseText) %> <% Response.write myNews Response.write myBase %> Retour à l'accueil