复制代码代码如下 :
<%onerrorresumenext%>
<%
DIMP, PPIC, ID, BODY, MYCACHE
무작위 화
p = int ((3*rnd) +1)
id = request.querystring ( "id")
httpurl = "http://sms.2e7.net/ 可爱卡通 0"& p & ". gif"
setmyCache = NewCache
mycache.name = "picindex"& id
ifmycache.validthen
body = mycache.value
또 다른
body = getwebdata (httpurl)
mycache.addbody, dateadd ( "d", 1, 지금)
endif
iferr.number = 0then
response.charset = "utf-8"
응답 .ContentType = "Application/Octet-stream"
응답 .BinaryWriteBody
응답. 플러시
또 다른
wscript.echoerr.description
endif
'取得数据
PublicFunctionGetWebData (ByValStrid)
DIMCIDPATH
cidpath = mid (strid, 1, instr (8, strid, "/"))))
Dimretrieval
setretRieval = server.createObject ( "microsoft.xmlhttp")
retrieval
. "get", strid, false, ",", ",", ",", "", ""
.SetRequestHeader "Certer", CidPath
.보내다
getWebData = .ResponseBody
끝
setretrieval = 아무것도
최종 기능 장애
%>