<%
'by kkf @ 2006 . 5 .21
On Error Resume Next
Response.Clear
Response.Buffer = True
Dim GetImg,xml
set xml=server.createobject("MSXML2.ServerXMLHTTP")
GetImg = Request.QueryString("url") '得到相册图片地址
If GetImg <> "" Then
xml.Open "GET",GetImg,False
xml.Send
End if
Dim ImgType,ImgSize
ImgType = Mid(GetImg,InStrRev(GetImg,".",-1,1)+1) '获得扩展名,这里我很不明白。如果用Right取出来的是。。
Response.ContentType = "image/" & ImgType
'Response.AddHeader "Content-Length", Clnt(len(xml.responseBody))
'Response.AddHeader "Content-Disposition","FileName=VCC5." & ImgType
Response.BinaryWrite xml.responseBody
Set xml = Nothing
If Err <> 0 Then
Call GetErr
Response.End
End if
Sub GetErr
Response.ContentType = "text/plain"
Response.Write "图片加载失败!"
Response.Write GetImg & chr(13)
Response.Write Err.description
End Sub
%>