I have a script that captures a visitor's IP address, then converts it to a number. This is so I can then lookup their city/region for personalization purposes on my site. The site is not live yet, but I'm having an issue with using the returned value from the CFSCRIPT as a variable to query my DB. Here's what the script looks like:
<CFSET visitorIP = "#CGI.Remote_Addr#">
if(arguments.visitorIP EQ "")
ips = ListToArray( arguments.visitorIP, "." );
return( ( 16777216 * ips ) + ( 65536 * ips ) + ( 256 * ips ) + ips );
I need to use the resulting number to query a table in my DSN. Right now, I have:
<cfset myIPNumber = #Dot2LongIP#>
But it's not working correctly - the returned value is "cfindex2ecfm1275582484$funcDOT2LONGIP@115e47a".
I only need the 1275582484 number out of that.
Thanks in advance!