ASP/Visual Basic代碼
- <%
 - Set xml = Server.CreateObject("Microsoft.XMLHTTP")
 - '易天科技提示您把下面的地址替換成你的首頁的文件地址,一定要用http://開頭的絕對路徑,不能寫相對路徑哦
 - xml.Open "GET", "http://www.k3107.com/yiskyindex.asp", False
 - xml.Send
 - BodyText=xml.ResponseBody
 - BodyText=BytesToBstr(BodyText,"gb2312")
 - Set xml = Nothing
 - Dim fso, MyFile
 - Set fso = CreateObject("Scripting.FileSystemObject")
 - Set MyFile= fso.CreateTextFile(server.MapPath("index.html"), True)
 - MyFile.WriteLine(BodyText)
 - MyFile.Close
 - Response.Write ( "易天科技www.k3107.com 提示您,成功生成文件:index.html" )
 - '定義BytesToBstr函數(shù)
 - 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
 - %>
 

