web|xml| Access | Web page
<%
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
%>
<title>xmlhttp Test </title>
<meta http-equiv= "Content-type" content= "text/html;charset=gb2312" >
<body bgcolor= "#D4D0C8" topmargin= "leftmargin=" 0 "rightmargin=" 0 "bottommargin=" 0 "marginwidth=" 0 " marginheight= "0" >
<div align= "center" >
<table border= "1" width= "770px" cellspacing= "0" cellpadding= "0" bordercolorlight= "#808080" bordercolordark= "# FFFFFF "height=" 356 ">
<tr>
<form method= "POST" >
<TD align= "center" height= "M" >
<input type= "text" name= "url" style= "width:700;height:20" value= "<%=url%>" >
<input type= "Submit" value= "View" > </td>
</form>
</tr>
<tr>
<TD align= "center" height= "124" >
<textarea id= "Textarea2" name= "Textarea2" rows= "7" cols= "><%=header%></textarea></td>"
</tr>
<tr>
<TD height= "230" align= "center" >
<textarea id= "Textarea1" name= "Textarea1" rows= "a" cols= "><%=bo%></textarea></td>"
</tr>
</table>
</div>
</body>