常用ASP函数集【经验才是最重要的】(5)
End If
End If
ElseIf Left(vibo_soft,5) ="Opera" Then
vibo_soft=Split(vibo_soft,"/")
Browser="Mozilla "
tmpstr=Split(vibo_soft(1)," ")
version=tmpstr(0)
End If
If version<>"unknown" Then
Dim Tmpstr1
Tmpstr1=Trim(Replace(version,".",""))
If Not IsNumeric(Tmpstr1) Then
version="unknown"
End If
End If
GetBrowser=Browser &" "& version
End function
function GetSearcher()
'----------------------识别搜索引擎
Dim botlist,Searcher
Dim vibo_soft
vibo_soft=Request.ServerVariables("HTTP_USER_AGENT")
Botlist="Google,Isaac,SurveyBot,Baiduspider,ia_archiver,P.Arthur,FAST-WebCrawler,Java,Microsoft-ATL-Native,TurnitinBot,WebGather,Sleipnir,TencentTraveler"
Botlist=split(Botlist,",")
For i=0 to UBound(Botlist)
If InStr(vibo_soft,Botlist(i))>0 Then
Searcher=Botlist(i)&" 搜索器"
IsSearch=True
Exit For
End If
Next
If IsSearch Then
GetSearcher=Searcher
else
GetSearcher="unknown"
End if
End function
'----------------------------------数据过滤 ↓---------------------------------------
Function CheckSql() '防止SQL注入
Dim sql_injdata
SQL_injdata = "'|and|exec|insert|select|delete|update|count|*|%|chr|mid|master|truncate|char|declare"
SQL_inj = split(SQL_Injdata,"|")
If Request.QueryString<>"" Then
For Each SQL_Get In Request.QueryString
For SQL_Data=0 To Ubound(SQL_inj)
if instr(Request.QueryString(SQL_Get),Sql_Inj(Sql_DATA))>0 Then
内容版权声明:除非注明,否则皆为本站原创文章。