Hello,
I am looking for a way to create an access database where I can import I.P addresses from an excel spreadsheet in order to query the database from an redirection ASP script on my site.
This is the code on my site (the file is called default.asp and only contains the following) :
<%
remoteIP = request.servervariables("R
EMOTE_ADDR
")
If left(remoteIP,6)="69.57." then
response.redirect("home.ht
m")
If left(remoteIP,6)="209.35" then
response.redirect("home.ht
m")
If left(remoteIP,6)="209.74" then
response.redirect("home.ht
m")
else
response.redirect("deny.ht
m")
end if
end if
end if
%>
As you can see, I have to "hard code" the ip ranges I want filtered which I really cannot do because of the amount of ranges I will eventually have to work with. That is why I want an access database on my web server which I can put all of the IP address into and just query the database from the script. I know I would have to probably use a different script or alter the one I am currently using, that is fine. Can someone assist? Thanks.
Start Free Trial