All articles(网络文学目录) All Pictures(图片目录) All Softwares(软件目录)

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

Writer: 归海一刀 Article type: Programming skills(编程技巧) Time: 2014/3/20 5:12:13 Browse times: 320 Comment times: 0

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


Head photo

Go homepage
Upload pictures
Write articles

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测试























There are 0 records,
Comment:
Must be registered users to comment(必须是注册用户才能发表评论)

Disclaimer Privacy Policy About us Site Map
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.