<%
Dim Ip,ipstring,visitip
' The IP address to be banned
Ipstring= "|195.225.177.34|195.225.177.137|72.232.250.10|"
' Get IP Address
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 "Your IP is forbidden to leave a message, if necessary, please contact the webmaster." If you are sending rubbish, advise you to stop! "
Response.End
End If
' Response. Write ("Your IP:" &IP& "access to this site")
%>
Note: Remember to embed this code in the head of the final execution page (not necessarily for the message publishing page), most of the garbage is directly post data to the execution page. It is recommended that you change the file name of the final execution page and the action in the Form tab of the page with which the link is posted.