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

Search Helpnote Topics

 

Ban an IP address from accessing your shopping cart

Ban an IP address from accessing your shopping cart

VPCart currently have a built-in functionality which allow the site administrator to block an IP address from placing an order and checkout. It does not ban the IP address from accessing the site however.

To ban the IP address from visiting the site completely, shop$db.asp will need to be modified.

Please follow the guides below (Compatible for V6.50 / V7.xx / V8.xx and above).

1. Open the file shop$db.asp and locate the following code :

const xSqlNative="No" ' use SQL Server 2005 native client

2. Under the code above, please copy and paste the following code :


'=====================
'Find out if the visitor's IP address is in the hackers database
dim hackerRS
dim visitorIP
shopopendatabase dbc
visitorIP = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If visitorIP="" Then visitorIP = Request.ServerVariables("REMOTE_ADDR")
set hackerRS = dbc.execute("Select * from hackers")
if not hackerRS.eof then
'show nothing to the hacker
response.end
end if
set hackerRS = nothing
'=====================

3. The next step is to add the hacker's IP address to the database.
3.a. To do this, please log into your administration page.
3.b. View the hacker's order. On the top right corner, you will see a button called "Add to Hacker". Click this button.


3.c. On the next page, make sure the hacker IP is there and click Add a Record button to add the hacker's ip address to the database.


Or you can also refer to our user manual page below on how to manually add hacker IP record into hackers table:
https://helpnotes.vpcart.com/userguide800/#!Documents/hackertable.htm

4. Visitor with the same IP address will now be blocked from accessing your site. They will simply see an empty page.




Times Viewed:
3850
Added By:
Frank / Wilson Keneshiro
Date Created:
6/23/2011
Last Updated:
2/9/2018
Back Search other topics Submit a Ticket