[ create a new paste ] login | about

Link: http://codepad.org/ZhkZgWeh    [ raw code | output | fork ]

PHP, pasted on Jul 8:
1
2
3
4
5
6
<?php
function ip2bin($input) {
    return implode('', array_map('decbin', array_map('intval', (explode('.', $input)))));
}

echo ip2bin('5.100.192.0');


Output:
1
1011100100110000000


Create a new paste based on this one


Comments: