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-Cart StoreFront Customer Forum

Home | Profile | Register | Active Topics | Members | Search | FAQ
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  

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) = ""
sIParray(1) = "62.454.32.25"
sIParray(2) = ""
'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

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