一個(gè)過濾廣告的函數(shù)

2010-08-28 10:46:32來源:西部e網(wǎng)作者:

Function WordFilter(Str)
 Dim MatchNum,MatchKey
 MatchNum = 0
 For i=1 To Len(Str)
 MatchKey=LCase(Mid(Str,i,4))
 If MatchKey="href" Or MatchKey="[url" Or MatchKey="http" Then MatchNum=MatchNum+1
 If MatchNum>3 Then Exit For
 Next
 If MatchNum>3 Then AlertTo Referer,"請不要貼廣告"
 WordFilter = Str
End Function
關(guān)鍵詞:asp

贊助商鏈接: