'ASP代码参考
Function GetBody(Url)'' 抓站点,网页小偷原理
Dim objXML
On Error Resume Next
Set objXML = CreateObject("Microsoft.XMLHTTP")
With objXML
.Open "Get", Url, False, "", ""
.Send
GetBody = .ResponseBody
End With
GetBody=BytesToBstr(GetBody,"GB2312")
'GetBody=BytesToBstr(GetBody,"UTF-8")
Set objXML = Nothing
End Function
'使用Adodb.Stream处理二进制数据
Function BytesToBstr(strBody,CodeBase)
dim objStream
set objStream = Server.CreateObject("Adodb.Stream")
objStream.Type = 1
objStream.Mode =3
objStream.Open
objStream.Write strBody
objStream.Position = 0
objStream.Type = 2
objStream.Charset = CodeBase
BytesToBstr = objStream.ReadText
objStream.Close
set objStream = nothing
End Function
当然可以的,用模板实现静态页面生成是可行的给你个地址:http://www.mifengzhijia.cn/mifeng/ASPNET/20090604/509.html
上面有方法,你可以参考一下!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)