Public Function GetPage(url)
Dim Retrieval
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False
.Send
GetPage = BytesToBstr(.ResponseBody)
End With
Set Retrieval = Nothing
End FunctionPublic Function BytesToBstr(body)
Dim objstream
Set objstream = CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode = 3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = "GB2312"
BytesToBstr = objstream.ReadText
objstream.Close
Set objstream = Nothing
End Function<%
'on error resume next
dim ByteMake
Set ByteMake=Server.CreateObject("Bytesstr.mstr")
Url="http://www.domain.com/a.asp"
wstr = ByteMake.GetPage(Url)Set fs=Server.CreateObject("Scripting.FileSystemObject")
If (fs.FileExists(server.MapPath("/a.html"))) Then
fs.DeleteFile(server.MapPath("/a.html"))
End IfSet CrFi=fs.CreateTextFile(server.MapPath("/a.html"))
Crfi.Writeline(wstr)
set CrFi=nothing
set fs=nothing
set ByteMake=nothing
response.write "...<font color=red>生成静态页完成!</font>"
%>
怎么每次查询出来生成静态页都一样呢!应该不一样才对!