国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > ASP > 正文

ASP實現頭像圖像隨機變換

2020-07-27 13:17:03
字體:
來源:轉載
供稿:網友
復制代碼 代碼如下:

<%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/可愛卡通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

'取得數據
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
%>


發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 奉化市| 西城区| 金阳县| 白银市| 龙陵县| 聂拉木县| 杨浦区| 菏泽市| 将乐县| 正蓝旗| 饶河县| 上虞市| 阿巴嘎旗| 时尚| 洛扎县| 肥东县| 广灵县| 黑河市| 景泰县| 望奎县| 乐陵市| 浑源县| 赣榆县| 社旗县| 墨江| 额济纳旗| 东平县| 巴马| 长治市| 繁峙县| 武强县| 诸暨市| 崇明县| 丰宁| 巍山| 安化县| 阜宁县| 镇康县| 黄浦区| 乐昌市| 广宗县|