Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 11-03-2000, 12:56 PM   #1
Member (10 bit)
 
Join Date: May 1999
Location: Orlando, FL
Posts: 975
Send a message via ICQ to artsapimp
I am wanting to obtain the IP address of everyone attempting to view my site (internal network) and either deny them access or grant them access depending on the IP range. I know in IIS I can do that but that's not fun at all. Here's my plan...

I want it to check the range and if it is 209.26.217.* it then redirects them to home.asp, instead it redirects them to contact.asp.

If you have any idea on how I could do it instead of posting every IP into a database and then comparing it with the Request.ServerVariables("Remote_Addr") IP address I would really appreciate it.

I guess the main question is how would I use a wildcard for the range, meaning anyone within that range (209.26.217.*)?

Thanks for any help.
artsapimp is offline   Reply With Quote
Old 11-03-2000, 02:34 PM   #2
Member (9 bit)
 
Join Date: Dec 1999
Location: Midland, NC, USA
Posts: 292
Try using "split":

Dim NodeArray
NodeArray = Split(Request.ServerVariables("Remote_Addr"), ".")
If NodeArray(0) = "209" and
NodeArray(1) = "26" and
NodeArray(2) = "217" then
...... do your redirect ......
End If
UncaDanno is offline   Reply With Quote
Old 11-03-2000, 02:43 PM   #3
Member (10 bit)
 
Join Date: May 1999
Location: Orlando, FL
Posts: 975
Send a message via ICQ to artsapimp
PERFECT!!!!

Thank you very much. That is exactly what I needed.
artsapimp is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 06:04 AM.
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.0