Trying to find code for blocking ip's

M

martien

Hello all,

i am trying to find some code or script for blocking ip's from entering my website.
is this possible ?

i am a newbie in asp.net so please keep the answers simple :)

Thanks

Martien

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
S

seb_gibbs

Put this at the start of each page, or put this in an include file (eg.'subroutines.asp') and reference it using something like '<!--#include file="subroutines.asp"-->' at of each page.


<%
RemoteIP = request.ServerVariables("REMOTE_ADDR")
if instr("123.123.123.123,1.2.3.4,..etc",RemoteIP) >0 then
response.write "Your banned"
response.end
end if

' rest of your page here...


%>


Seb
www.sebsworld.co.uk


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,263
Messages
2,571,062
Members
48,769
Latest member
Clifft

Latest Threads

Top