ASP实现头像图像随机变换

(编辑:jimmy 日期: 2024/9/22 浏览:2)

复制代码 代码如下:
<%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
%>


一句话新闻
Windows上运行安卓你用过了吗
在去年的5月23日,借助Intel Bridge Technology以及Intel Celadon两项技术的驱动,Intel为PC用户带来了Android On Windows(AOW)平台,并携手国内软件公司腾讯共同推出了腾讯应用宝电脑版,将Windows与安卓两大生态进行了融合,PC的使用体验随即被带入到了一个全新的阶段。