<% Function BytesToBstr(body,Cset) dim objstream set objstream = Server.CreateObject("adodb.stream") objstream.Type = 1 objstream.Mode =3 objstream.Openobjstream.Write body objstream.Position = 0 objstream.Type = 2 objstream.Charset = Cset BytesToBstr = objstream.ReadText objstream.Close set objstream = nothingEnd 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 = nothingend if %> XMLHTTP测试
以上就是XMLHTTP获取web访问头信息和网页的示例代码分析的详细内容,更多请关注考高分网其它相关文章!



