Asp > Code Snippets
Block more than one IP address
Block more than one IP address <% '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
Asp Codes
ActiveX
ADO
Array
Code Snippets
Components
Data Access
Date Time
Files
Graphics
HTML Formatting
Mathematics
Miscellaneous
Sessions
SQL
Strings
Techniques
XML