Don Oldenburg
|
| Posted: 08/07/2001, 10:00 AM |
|
Okay -- what is wrong with the second line of code? Is there anyway I can
look at a variable, and restrict it to the left most "7" characters? the
rest of the code that follows basically sets a flag and session variable to
whether the user is browsing the web from behind the firewall, or outside on
the internet. I am using this information for certain functions -- like
links of web addresses... if your from outside the firewall, they reference
one set of links, or behind the firewall another.
Also as an added level of security -- my form which can display user
passwords can only be viewed from within our local network... All of
this -- assuming I can parse out the last 7 digits of the ip address to make
that determination.
ip=Request.ServerVariables("REMOTE_HOST")
if left(ip,7)='192.168' then
|
|
|
 |
Henrik B. Rasmussen
|
| Posted: 08/07/2001, 1:54 PM |
|
This is a multi-part message in MIME format.
------=_NextPart_000_0ACA_01C11F93.F592D9A0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi Don
Try this
if left(ip,7)=3D"192.168" then
/Henrik
"Don Oldenburg" <don.oldenburg@cacmnet.com> wrote in message =
news:9kp6rv$3gl$1@news.codecharge.com...
> Okay -- what is wrong with the second line of code? Is there anyway I =
can
> look at a variable, and restrict it to the left most "7" characters? =
the
> rest of the code that follows basically sets a flag and session =
variable to
> whether the user is browsing the web from behind the firewall, or =
outside on
> the internet. I am using this information for certain functions -- =
like
> links of web addresses... if your from outside the firewall, they =
reference
> one set of links, or behind the firewall another.
>=20
> Also as an added level of security -- my form which can display user
> passwords can only be viewed from within our local network... All of
> this -- assuming I can parse out the last 7 digits of the ip address =
to make
> that determination.
>=20
>=20
> ip=3DRequest.ServerVariables("REMOTE_HOST")
> if left(ip,7)=3D'192.168' then
>=20
>=20
>=20
>=20
------=_NextPart_000_0ACA_01C11F93.F592D9A0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2505.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2>Hi Don</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Try this</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV>if left(ip,7)=3D<FONT color=3D#ff0000>"</FONT>192.168<FONT=20
color=3D#ff0000>"</FONT> then</DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>/Henrik</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>"Don Oldenburg" <</FONT><A=20
href=3D"mailto:don.oldenburg@cacmnet.com"><FONT face=3DArial=20
size=3D2>don.oldenburg@cacmnet.com</FONT></A><FONT face=3DArial =
size=3D2>> wrote in=20
message </FONT><A href=3D"news:9kp6rv$3gl$1@news.codecharge.com"><FONT =
face=3DArial=20
size=3D2>news:9kp6rv$3gl$1@news.codecharge.com</FONT></A><FONT =
face=3DArial=20
size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Okay -- what =
is wrong with=20
the second line of code? Is there anyway I can<BR>> look at a =
variable,=20
and restrict it to the left most "7" characters? the<BR>> rest =
of the=20
code that follows basically sets a flag and session variable to<BR>> =
whether=20
the user is browsing the web from behind the firewall, or outside =
on<BR>> the=20
internet. I am using this information for certain functions --=20
like<BR>> links of web addresses... if your from outside the =
firewall, they=20
reference<BR>> one set of links, or behind the firewall =
another.<BR>>=20
<BR>> Also as an added level of security -- my form which can display =
user<BR>> passwords can only be viewed from within our local =
network... =20
All of<BR>> this -- assuming I can parse out the last 7 digits of the =
ip=20
address to make<BR>> that determination.<BR>> <BR>> <BR>>=20
ip=3DRequest.ServerVariables("REMOTE_HOST")<BR>> if =
left(ip,7)=3D'192.168'=20
then<BR>> <BR>> <BR>> <BR>> </FONT></BODY></HTML>
------=_NextPart_000_0ACA_01C11F93.F592D9A0--
|
|
|
 |
|