Page 1 of 1 1
Topic Options
#62593 - 2002-01-31 01:07 AM Need help with setting up IP range.
Anonymous
Unregistered


This bit of code not working properly.

? "" + $OCT4 ? returns "131" - correct.

this is between 50 and 239 so should be DHCP range.. But it always says its not. Help?

code:

$SERVER = "0"
$OCT4 = LTRIM(SUBSTR(@IPAddress0, 13, 3))
? "" + $OCT4 ?
IF $OCT4 <= "50" AND $OCT4 >= "239"
? "MACHINE IN DHCP RANGE"
ELSE
? "MACHINE NOT IN DHCP RANGE"
$SERVER = "1"
ENDIF


I use the $server variable later for various tasks.
Thanks

Top
#62594 - 2002-01-31 01:35 AM Re: Need help with setting up IP range.
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
try

if val($oct4) >= 50 and val($oct4) <= 239

this statment will be true only if the value of $oct4 is greater than or equalto 50 and less than or equal to 239.


Bryce

Top
#62595 - 2002-01-31 01:56 AM Re: Need help with setting up IP range.
Anonymous
Unregistered


Thanks Bryce, your a god...

Worked like a charm.

Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 302 anonymous users online.
Newest Members
Sir_Barrington, batdk82, StuTheCoder, M_Moore, BeeEm
17886 Registered Users

Generated in 0.051 seconds in which 0.023 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org