Copy Code code as follows:
<%on Error Resume next%>
<%
Dim p, Ppic, ID, body, mycache
Randomize
P=int ((3*rnd) +1)
Id= request.querystring ("id")
Httpurl= "http://sms.2e7.net/cute cartoon 0" &p& ". gif"
Set Mycache = new cache
Mycache.name = "Picindex" &id
If Mycache.valid Then
BODY = Mycache.value
Else
BODY = Getwebdata (Httpurl)
Mycache.add Body,dateadd ("D", 1,now)
End If
If Err.Number = 0 Then
Response.Charset = "UTF-8"
Response.ContentType = "Application/octet-stream"
Response.BinaryWrite Body
Response.Flush
Else
WScript.Echo Err.Description
End If
' Get the data
Public Function Getwebdata (ByVal Strid)
Dim Cidpath
Cidpath = Mid (Strid,1,instr (8,strid, "/")
Dim Retrieval
Set retrieval = Server.CreateObject ("Microsoft.XMLHTTP")
With retrieval
. Open "Get", Strid, False, "", ""
. setRequestHeader "Referer", Cidpath
. Send
Getwebdata =. Responsebody
End With
Set retrieval = Nothing
End Function
%>