<%
Fungsi BytesToBstr(tubuh,Cset)
objek redup
setel objstream = Server.CreateObject("adodb.stream")
objstream.Jenis = 1
objstream.Mode =3
objstream.Buka
objstream.Tulis isi
objstream.Posisi = 0
objstream.Jenis = 2
objstream.Charset = Cset
BytesToBstr = objstream.ReadText
objstream.Tutup
setel objstream = tidak ada
Fungsi Akhir
url=request.form("url")
jika trim(url)<>"" lalu
atur xml = Server.CreateObject("MSXML2.XMLHTTP.5.0")
xml.buka "GET",url, Salah
xml.kirim
bo = BytesToBstr(xml.ResponseBody,"UTF-8")
header = xml.GetAllResponseHeaders
atur xml = tidak ada
berakhir jika
%>
<html>
<kepala>
<title>XMLHTTP测试</title>
<meta http-equiv="Jenis Konten" content="text/html;charset=gb2312">
</head>
<tubuh bgcolor = "#D4D0C8" topmargin = "20" leftmargin = "0" rightmargin = "0" bottommargin = "0" marginwidth = "0" marginheight = "0">
<div align = "center" >
<tabel border="1" width="770px" Cellspacing="0" cellpadding="0" bordercolorlight="#808080" bordercolordark="#FFFFFF" height="356">
<tr>
<metode formulir="posting">
<td align="center" height="50">
<input type="teks" nama="url" style="lebar:700;tinggi:20" value="<%=url%>">
<input type="kirim" value="查看"> </td>
</bentuk>
</tr>
<tr>
<td align="center" height="124">
<textarea id="Textarea2" name="Textarea2" row="7" cols="105"><%=header%></textarea></td>
</tr>
<tr>
<td tinggi="230" align="tengah">
<textarea id="Textarea1" name="Textarea1" row="14" cols="105"><%=bo%></textarea></td>
</tr>
</tabel>
</div>
</tubuh>
</html>