将asp页面转换成html页面

来源:互联网 发布:淘宝怎么把销量做上去 编辑:程序博客网 时间:2024/05/16 09:59

Sub GenFile(id)

  dim objXmlHttp
  set objXmlHttp = Server.CreateObject("Microsoft.XMLHTTP")
  objXmlHttp.open "GET","http://www.xxx.com/product.asp?id=" & id ,false
  objXmlHttp.send()

  Dim binFileData
  binFileData = objXmlHttp.responseBody

  Dim objAdoStream
  set objAdoStream = Server.CreateObject("ADODB.Stream")
  objAdoStream.Type = 1
  objAdoStream.Open()
  objAdoStream.Write(binFileData)
  objAdoStream.SaveToFile Server.MapPath("/product") & "/" & id &  ".htm",2
  objAdoStream.Close() 
 end sub

原创粉丝点击