[ create a new paste ] login | about

Link: http://codepad.org/3QDQ2OVK    [ raw code | output | fork | 1 comment ]

PHP, pasted on Oct 16:
1
2
3
4
5
6
7
8
9
<?php

$ip1 = '192.168.1.2';
$ip2 = '192.168.1.10';

for ($ip = ip2long($ip1); $ip<=ip2long($ip2); $ip++)
{
    echo long2ip($ip) . "\n";
}


Output:
1
2
3
4
5
6
7
8
9
192.168.1.2
192.168.1.3
192.168.1.4
192.168.1.5
192.168.1.6
192.168.1.7
192.168.1.8
192.168.1.9
192.168.1.10


Create a new paste based on this one


Comments:
posted by quicksilver on Oct 16
great!
reply