•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ASP section within the Web Development category of DaniWeb, a massive community of 332,778 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,830 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ASP advertiser: Lunarpages ASP Web Hosting
This is a small function that will block the specific IP from viewing the certain page, and it will redirect the user to the main page or noaccess page.
Last edited : Oct 29th, 2006.
<% ''''''''''''''''''''''''''''''' ' Block the IP addresses that do the SPAM ''''''''''''''''''''''''''''''' Function IsBlockedIP() Dim UserIP Dim BlockedIParray(2) 'assign our blocked IP addresses to our array BlockedIParray(0) = "60.0.201.209" BlockedIParray(1) = "218.11.15.212" 'retrieve the visitors IP address UserIP = Request.ServerVariables("REMOTE_ADDR") 'loop through the Blocked IPs For i = 0 to UBound(BlockedIParray) If UserIP = BlockedIParray(i) Then Response.Redirect "index.asp" 'Response.Redirect "noaccess.asp" End If Next End Function %>
Comments (Newest First)
Post Comment
•
•
•
•
DaniWeb Marketplace (Sponsored Links)