XMLHTTP生成静态网页代码

XMLHTTP生成静态网页代码

url = "http://www.0535code.com/"
set http=Server.createobject("Msxml2.XMLHTTP")
Http.open "GET",url,false
Http.send()
set objStream = Server.CreateObject("ADODB.Stream")
objStream.type = 1
objStream.open
objstream.write http.responseBody
objstream.saveToFile server.mappath("index.html"),2
objstream.close
Response.Write "成功生成主页!<a href=index.html>浏览主页</a>"

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.