Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- for ( $i = 1; $i < 254; $i++ ) {
- $fp = @fsockopen('192.168.1.'.$i, 80, $errno, $errstr, 0.1);
- if( !$fp ) {
- echo '192.168.1.'.$i." = offline\n";
- } else {
- echo '192.168.1.'.$i." = online\n";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment