Go homepage(回首页)
Upload pictures (上传图片)
Write articles (发文字帖)

The author:(作者)归海一刀
published in(发表于) 2014/3/20 5:12:13
XMLHTTP获取web访问头信息和网页代码_[XML教程]

XMLHTTP获取web访问头信息和网页代码_[XML教程]

<%


Function BytesToBstr(body,Cset)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function


url=request.form("url")
if trim(url)<>"" then
set xml = Server.CreateObject("MSXML2.XMLHTTP.5.0")
xml.open "GET",url, False
xml.send
bo = BytesToBstr(xml.ResponseBody,"UTF-8")
header = xml.GetAllResponseHeaders
set xml = nothing
end if


%>



XMLHTTP测试





























If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)





QQ:154298438
QQ:417480759