Please excuse the wrapping imposed by Eudora.......

At 12:52 PM 7/10/2000 -0500, you wrote:
>Here is a real quicky I put together over lunch:
>
>======================  Start Code ==========================================
>
><cfparam name="Attributes.IP" default="0.0.0.0">
>
><cfif ListLen(Attributes.IP, ".") NEQ 4 OR ListGetAt(Attributes.IP, "1",
>".") EQ 0>
>
>    <!---
>         Error catching goes here.  A long cfif goes above to catch possible
>         errors in each octet of the IP address.  The current catching is very
>         rudimentary.
>    --->
>
>    <cfset Error = "Bad IP address provided">
>
><cfelse>
>
>    <cfscript>
>
>      DotlessIP = (ListGetAt(Attributes.IP, "1", ".") * (256 ^ 3)) +
>(ListGetAt(Attributes.IP, "2", ".") * (256 ^ 2)) +
>(ListGetAt(Attributes.IP, "3", ".") * 256) + ListGetAt(Attributes.IP, "4",
>".");
>
>    </cfscript>
>
></cfif>
>
><cfif NOT isDefined("Error")>
>    <cfset Caller.DotlessIP = DotlessIP>
><cfelse>
>    <cfset Caller.DotlessIP = Error>
></cfif>
>
>========================== End Code ===============================
[snip]

------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
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.

Reply via email to