On 10/13/05, Bosky, Dave <Dave.Bosky@xxxxxxxxxx> wrote:> Does anyone have a function that will check if an ip address falls with> a starting/ending ip address range>> #!/usr/bin/php<?php $ip = '10.0.0.1';$ip2 = '10.0.0.2';$ip3 = '10.0.0.3'; $ip = abs( ip2long( $ip ) );$ip2 = abs( ip2long( $ip2 ) );$ip3 = abs( ip2long( $ip3 ) ); if( $ip2 > $ip && $ip2 < $ip3 || $ip2 < $ip && $ip2 > $ip3 ){ echo "In range\n";}else{ echo "Not in range\n";} ?> --Greg DonaldZend Certified EngineerMySQL Core Certificationhttp://destiney.com/