当前位置:编程学习 > asp >>

Asp如果获取远程服务器上图片

<%
'Response.CharSet = "UTF-8"
Response.ContentType = "application/octet-stream"
Response.BinaryWrite GetData("http://www.csdn.net/Images/logo_csdn.gif")
Response.Flush
Function GetData(sUrl)
    Dim oHttp : Set oHttp = Server.CreateObject("Microsoft.XMLHTTP")
    oHttp.Open "Get", sUrl, False,"",""
    oHttp.setRequestHeader "Referer",sUrl
    oHttp.Send
    GetData = oHttp.ResponseBody
    Set oHttp = Nothing
End Function
%>

补充:asp教程,高级应用
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,