This file contains hidden or 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
| function int2ip (ipInt) { | |
| return ( (ipInt>>>24) +'.' + (ipInt>>16 & 255) +'.' + (ipInt>>8 & 255) +'.' + (ipInt & 255) ); | |
| } |
This file contains hidden or 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 | |
| // from http://www.highonphp.com/regex-pattern-parsing-ifconfig | |
| $data = <<<EOF | |
| eth0 Link encap:Ethernet HWaddr 00:50:56:33:B6:D2 | |
| inet addr:192.168.12.103 Bcast:192.168.12.255 Mask:255.255.255.0 | |
| UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | |
| RX packets:1337 errors:0 dropped:0 overruns:0 frame:0 | |
| TX packets:985 errors:0 dropped:0 overruns:0 carrier:0 |