IP2IPLong ( IP )
Converts IP to IPLong
Average rating: 4.8 (24 votes) Log in to vote
Dick Impens - Show more from this author
MaltaCode https://maltacode.com |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
This function converts a IP address to a IPLong INT, widely used by PHP to save space in a database.
Comments
unix, Japan Sep 30, 2013 |
||
We need only one Let function... Let ( [ string = Substitute ( IP ; "." ; ¶ ) ; A = GetValue ( string ; 1 ) ; B = GetValue ( string ; 2 ) ; C = GetValue ( string ; 3 ) ; D = GetValue ( string ; 4 ) ]; ( (a * 256 + b ) * 256 + c ) * 256 + d ) |
||
Dick Impens, MaltaCode Oct 1, 2013 |
||
Thx unix, neat formattig. | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.