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 ===============================
Not very elegant, but it works.
Russel
At 01:11 PM 7/10/2000 -0400, you wrote:
>[snip]
>
>I'm holding back from posting my tag result to the gallery so I can see what
>others will try. If anyone wants the tag now without trying to do it
>themselves, contact me off list.
>
>
>
>------------------------------------------------------------------------------
>Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
>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.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
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.