- <%
- 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&"可以访问本站")
- %>