Helpful bits and bytes
<?php function mask2cidr($mask){ $long = ip2long($mask); $base = ip2long('255.255.255.255'); return 32-log(($long ^ $base)+1,2); } ?>
No comments:
Post a Comment