You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
532 B
Plaintext

<%
'declare our variables
Dim strIP
Dim intBanned
Dim arrIP(1)
'these are our blocked IP addresses
arrIP(0) = "127.0.0.01"
arrIP(1) = "100.45.76.80"
'get the users IP address
strIP = Request.ServerVariables("LOCAL_ADDR")
intBanned = 1
'loop through the banned IP addresses
For i = 0 to intBanned
'display a message and stop processing the page
If strIP = arrIP(intBanned) Then
Response.Write "You are blocked from this site"
Response.End
End If
Next
'a welcome message if IP is OK
response.Wr