Asp封IP代码

      Asp 2006-3-14 13:41
一个简单封IP的ASP代码
<%
Dim IP,IPString,VisitIP
'要禁止的IP地址
IPString="|219.142.118.71|127.0.0.1|"
'获取IP地址
IP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If IP = "" Then
IP = Request.ServerVariables("REMOTE_ADDR")
End If
VisitIP="|"&IP&"|"
If instr(1,IPString,VisitIP)>0 Then
response.write "你的IP被禁止"
response.end
End If
response.Write("你的IP:"&IP&"可以访问本站")
%>
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commenttime}{commentauthor}

{CommentUrl}
{commentcontent}