国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 建站經驗 > 正文

asp動態頁面防_采集的新方法

2019-11-02 15:30:09
字體:
來源:轉載
供稿:網友

<[email protected]="VBSCRIPT" CODEPAGE="936"%>
<%
Response.Write(Server.HTMLEncode(GetHttpPage("http://localhost/Index.asp教程","GB2312")))
==============================
函 數 名:GetHttpPage
作 用:獲取頁面源代碼函數
參 數:網址HttpUrl
==============================
Function GetHttpPage(HttpUrl,Code)
If IsNull(HttpUrl)=True Or HttpUrl="" Then
GetHttpPage="A站點維護中!"
Exit Function
End If
On Error Resume Next
Dim Http
Set Http=server.createobject("MSX"&"ML2.XML"&"HTTP")
Http.open "GET",HttpUrl,False
Http.Send()
If Http.Readystate<>4 then
Set Http=Nothing
GetHttpPage="B站點維護中!"
Exit function
End if
GetHttpPage=BytesToBSTR(Http.responseBody,Code)
Set Http=Nothing
If Err.number<>0 then
Err.Clear
GetHttpPage="C站點維護中!"
Exit function
End If
End Function
==============================
函 數 名:BytesToBstr
作 用:轉換編碼函數
參 數:字符串Body,編碼Cset
==============================
Function BytesToBstr(Body,Cset)
Dim Objstream
Set Objstream = Server.CreateObject("ado"&"d"&"b.st"&"re"&"am")
Objstream.Type = 1
Objstream.Mode =3

幽默笑話[www.62-6.com/1/gaoxiaoduanzi/]

Objstream.Open
Objstream.Write body
Objstream.Position = 0
Objstream.Type = 2
Objstream.Charset = Cset
BytesToBstr = Objstream.ReadText
Objstream.Close
set Objstream = nothing
End Function
%>
<%
Dim Conn,Rs,Sqlstr,Ip
Set Conn = Server.CreateObject("Adodb.Connection")
Set Rs=Server.Createobject("Adodb.RecordSet")
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Data.mdb")
Conn.Open ConnStr
Ip=Request.ServerVariables("REMOTE_ADDR")
Sqlstr="Select * From [Ip2]"
Rs.Open Sqlstr,Conn,1,3
Application.Lock()
Rs.AddNew()
Rs("Ip2_Address")=Ip
Rs.Update()
Application.UnLock()
Rs.Close
%>
<[email protected]="VBSCRIPT" CODEPAGE="936"%>
<%
Dim Conn,Rs,Sqlstr,Ip,IpTime,IpTime2,NewUser
NewUser=0
Set Conn = Server.CreateObject("Adodb.Connection")
Set Rs=Server.Createobject("Adodb.RecordSet")
ConnStr="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Data.mdb")
Conn.Open ConnStr
Ip=Request.ServerVariables("REMOTE_ADDR")
Sqlstr="Select * From [Ip1] Where Ip1_Address='"&Ip&"' Order By Ip1_Id Desc"
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 陆良县| 武鸣县| 通州市| 邓州市| 盐边县| 仙游县| 东乡族自治县| 滨海县| 镇康县| 同仁县| 石嘴山市| 潞城市| 乡宁县| 辽阳市| 涟水县| 台中市| 汝阳县| 宜城市| 宜黄县| 涿鹿县| 独山县| 安达市| 宣威市| 顺平县| 梧州市| 法库县| 滕州市| 治县。| 巴林左旗| 西吉县| 泌阳县| 沾益县| 濮阳县| 封丘县| 莱西市| 德令哈市| 邹城市| 海城市| 盘山县| 集安市| 枞阳县|