国产探花免费观看_亚洲丰满少妇自慰呻吟_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"
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 阿瓦提县| 吉安市| 淮安市| 锡林郭勒盟| 洪泽县| 蒲城县| 胶州市| 施秉县| 阳朔县| 依兰县| 喀喇沁旗| 兴国县| 通渭县| 华亭县| 聂拉木县| 榆林市| 嘉祥县| 邹平县| 双鸭山市| 资兴市| 甘孜县| 阳高县| 樟树市| 越西县| 中江县| 东方市| 时尚| 轮台县| 莎车县| 柯坪县| 两当县| 梁山县| 尖扎县| 峡江县| 三穗县| 房产| 衡水市| 颍上县| 海丰县| 夹江县| 政和县|