VP-ASP :: Shopping Cart Software

Shopping Cart Software Solutions for anywhere in the World

US/Canada(Toll Free): +1 888 587 2278
Europe/UK: +44 (020) 7193 9408
Australia/New Zealand: +61 3 9016 4497

VP-ASP Shopping Cart Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VPCart Forum
 General help me questions
 where to copy these code?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

aslook3000
Starting Member

49 Posts

Posted - August 28 2007 :  00:23:02  Show Profile  Visit aslook3000's Homepage  Reply with Quote
I want to block some Ip to visiting my product
I think it should be shopexd.asp

here is the code:
<%
'declare variables
Dim sIP
Dim sIParray(2)
'assign our blocked IP addresses to our array
sIParray(0) = "58.213.208.36"
sIParray(1) = "62.454.32.25"
sIParray(2) = "62.254.32.17"
'retrieve the visitors IP address
sIP = Request.ServerVariables("REMOTE_ADDR")

'loop through the banned IPs using the UBound function
For i = 0 to UBound(sIParray)
'check if IP address matches any of the blocked IPs
If sIP = sIParray(i) Then
Response.Redirect "no_access.asp"
End If
Next
%>



where should I copy these code.
I try to copy them in th top
or below <%Option Explicit%>


but it will currpt the file itself
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000