Created
April 5, 2012 16:06
-
-
Save mathewpeterson/2312197 to your computer and use it in GitHub Desktop.
This will generate an array of ip address
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ip_range($from, $to) { | |
$start = ip2long($from); | |
$end = ip2long($to); | |
$range = range($start, $end); | |
return array_map('long2ip', $range); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment