|
 |
asp_web_howto thread: RE: How to parse an IP address
Message #1 by "Jeff McFarland" <jeff@s...> on Thu, 20 Jun 2002 20:32:06
|
|
> Hi !
I would use:
If left(request.servervariables("remote_addr"), 8) = "155.155." then
Response.redirect ("pageA.asp")
Else
Response.redirect (pageB.asp")
End if
PauloF
********************************************
Thanks Paulo...
Works great!
Message #2 by kyle.b.willman@u... on Thu, 20 Jun 2002 13:58:15 -0500
|
|
To return the IP address, set a string variable equal to
Request.ServerVariables("REMOTE_ADDR")
Then you can use his split code to do the rest!
Kyle B. Willman
PricewaterhouseCoopers LLP
Office: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
Shaun Steckley
<SSTECKLEY@P... To: "ASP Web HowTo" <asp_web_howto@p...>
OM> cc:
06/20/2002 01:55 Subject: [asp_web_howto] RE: How to parse an IP address
PM
Please respond to
"ASP Web HowTo"
Split the IP and compare the parts. That may get you started with
something...
strIPArray = Split(strIPAddress, ".")
if (strIPArray(1) = "155") then
' do whatever
end if
-----Original Message-----
From: Jeff McFarland [mailto:jeff@s...]
Sent: Thursday, June 20, 2002 4:00 PM
To: ASP Web HowTo
Subject: [asp_web_howto] How to parse an IP address
I need to figure out a way to take a user's IP address and parse it. If
the user's IP address begins with 155.155.whatever.whatever, the user is
coming from within our company. If they are coming from within... they
will be redirected to pageA.asp, else be redirected to pageB.asp for non-
company user's. Any help would be appreicated!!
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
The information contained in this email is confidential and is intended
solely for the use of the person identified and intended as the recipient.
If you are not the intended recipient, any disclosure, copying,
distribution, or taking of any action in reliance on the contents is
prohibited. If you receive this message in error, contact the sender
immediately and delete it from your computer.
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
_________________________________________________________________
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential
and/or privileged material. Any review, retransmission,
dissemination or other use of, or taking of any action in reliance
upon, this information by persons or entities other than the
intended recipient is prohibited. If you received this in error,
please contact the sender and delete the material from any
computer.
Message #3 by "Jeff McFarland" <jeff@s...> on Thu, 20 Jun 2002 20:00:22
|
|
I need to figure out a way to take a user's IP address and parse it. If
the user's IP address begins with 155.155.whatever.whatever, the user is
coming from within our company. If they are coming from within... they
will be redirected to pageA.asp, else be redirected to pageB.asp for non-
company user's. Any help would be appreicated!!
Message #4 by Shaun Steckley <SSTECKLEY@P...> on Thu, 20 Jun 2002 14:55:34 -0400
|
|
Split the IP and compare the parts. That may get you started with
something...
strIPArray = Split(strIPAddress, ".")
if (strIPArray(1) = "155") then
' do whatever
end if
-----Original Message-----
From: Jeff McFarland [mailto:jeff@s...]
Sent: Thursday, June 20, 2002 4:00 PM
To: ASP Web HowTo
Subject: [asp_web_howto] How to parse an IP address
I need to figure out a way to take a user's IP address and parse it. If
the user's IP address begins with 155.155.whatever.whatever, the user is
coming from within our company. If they are coming from within... they
will be redirected to pageA.asp, else be redirected to pageB.asp for non-
company user's. Any help would be appreicated!!
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
The information contained in this email is confidential and is intended solely for the use of the person identified and intended as
the recipient. If you are not the intended recipient, any disclosure, copying, distribution, or taking of any action in reliance on
the contents is prohibited. If you receive this message in error, contact the sender immediately and delete it from your computer.
Message #5 by "Paulo Fernandes" <paulofernandes@c...> on Thu, 20 Jun 2002 20:06:27 +0100
|
|
Hi !
I would use:
If left(request.servervariables("remote_addr"), 8) = "155.155." then
Response.redirect ("pageA.asp")
Else
Response.redirect (pageB.asp")
End if
PauloF
-----Original Message-----
From: Jeff McFarland [mailto:jeff@s...]
Sent: quinta-feira, 20 de Junho de 2002 20:00
To: ASP Web HowTo
Subject: [asp_web_howto] How to parse an IP address
I need to figure out a way to take a user's IP address and parse it. If
the user's IP address begins with 155.155.whatever.whatever, the user is
coming from within our company. If they are coming from within... they
will be redirected to pageA.asp, else be redirected to pageB.asp for
non-
company user's. Any help would be appreicated!!
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
|
|
 |