What is the correct way to write the following?
I need to redirect a user based on his/her IP address range if the
CGI.REMOTE_ADDR falls between 2 IP address ranges or if using a netmask.
CFIF (#Left(CGI.REMOTE_ADDR, 13)# between ('172.29.278.33' and
'172.29.278.62'))
cflocation url=. etc
:[EMAIL PROTECTED]
Sent: Friday, April 27, 2007 2:42 PM
To: CF-Talk
Subject: get Range Between 2 IP addresses
What is the correct way to write the following?
I need to redirect a user based on his/her IP address range if the
CGI.REMOTE_ADDR falls between 2 IP address ranges or if using a netmask.
CFIF
i don't believe that'll work as intended.
you can always use listLast() using the period as a delimiter to get
those last octals and -then- use the BETWEEN operator.
also, you could convert the addresses to their integer counterparts.
i believe the formula is:
(first octet * 16777216) + (second
cfif listlast(cgi.remoate_addr, '.') GTE 33 and listlast(cgi.remoate_addr,
'.') LTE 62
-Original Message-
From: Elena Aminova [mailto:[EMAIL PROTECTED]
Sent: Friday, April 27, 2007 3:42 PM
To: CF-Talk
Subject: get Range Between 2 IP addresses
What is the correct way to write
4 matches
Mail list logo