This is a multi-part message in MIME format.
--------------71B1E349269CF0F5FFC63B76
Content-Type: multipart/alternative;
boundary="------------830DD7D2B0271BA74B23A838"
--------------830DD7D2B0271BA74B23A838
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Um, if you used "contains" like that, then you would improperly accept IP addresses of
the form *.206.162.74, wouldn't you?
Instead, how about using GetToken() as follows?
cfset ip = #cgi.remote_addr#
cfset lastoctet = gettoken(ip,4,".")
cfif #left(ip,11)# is "206.162.74." and #lastoctet# ge 1 and #lastoctet# le 255
.......
Plenty of other ways you could do this, too -- they all boil down to having to isolate
the last octet of the IP address if you want to make numerical comparisons against it.
-- LBA
Jay Jennings wrote:
> > <cfif #cgi.remote_addr# GT '206.162.74.1' AND #cgi.remote_addr# LT
> > '206.162.74.255'>
> > However, since the IP is not really a number, I am getting an
> > error when it
> > tried to evaluate. Is there a way to trim the address to seperate pieces
>
> Try something like:
> cfif cgi.remote_addr contains "206.162.74"
>
> Or, instead of using CONTAINS you could use one of the string comparison
> functions in CF.
>
> Jay Jennings
>
> ------------------------------------------------------------------------------
> Archives: http://www.eGroups.com/list/cf-talk
> To Unsubscribe visit
>http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
>message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
--------------830DD7D2B0271BA74B23A838
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Um, if you used "contains" like that, then you would improperly accept
IP addresses of the form *.206.162.74, wouldn't you?
<p>Instead, how about using GetToken() as follows?
<p>cfset ip = #cgi.remote_addr#
<br>cfset lastoctet = gettoken(ip,4,".")
<br>cfif #left(ip,11)# is "206.162.74." and #lastoctet# ge 1 and #lastoctet#
le 255
<br>.......
<p>Plenty of other ways you could do this, too -- they all boil down to
having to isolate the last octet of the IP address if you want to make
numerical comparisons against it.
<p>-- LBA
<p>Jay Jennings wrote:
<blockquote TYPE=CITE>> <cfif #cgi.remote_addr# GT '206.162.74.1'
AND #cgi.remote_addr# LT
<br>> '206.162.74.255'>
<br>> However, since the IP is not really a number, I am getting an
<br>> error when it
<br>> tried to evaluate. Is there a way to trim the address to seperate
pieces
<p>Try something like:
<br> cfif cgi.remote_addr contains
"206.162.74"
<p>Or, instead of using CONTAINS you could use one of the string comparison
<br>functions in CF.
<p> Jay Jennings
<p>------------------------------------------------------------------------------
<br>Archives: <a
href="http://www.eGroups.com/list/cf-talk">http://www.eGroups.com/list/cf-talk</a>
<br>To Unsubscribe visit <a
href="http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk">http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk</a>
or send a message to [EMAIL PROTECTED] with 'unsubscribe'
in the body.</blockquote>
</html>
--------------830DD7D2B0271BA74B23A838--
--------------71B1E349269CF0F5FFC63B76
Content-Type: text/x-vcard; charset=us-ascii;
name="afrinl.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Lawrence B. Afrin, M.D.
Content-Disposition: attachment;
filename="afrinl.vcf"
begin:vcard
n:Afrin, M.D.;Lawrence
tel;fax:843-792-3200
tel;work:843-792-4271
x-mozilla-html:FALSE
org:Hollings Cancer Center and the Division of Hematology/Oncology, Medical University
of South Carolina
version:2.1
email;internet:[EMAIL PROTECTED]
title:Assistant Professor of Medicine
adr;quoted-printable:;;Division of Hematology/Oncology, CSB903=0D=0AP.O. Box 250623,
96 Jonathan Lucas Street;Charleston;SC;29425;USA
x-mozilla-cpt:;0
fn:Afrin, M.D., Lawrence
end:vcard
--------------71B1E349269CF0F5FFC63B76--
------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.