Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Get CIDRs from Robtex, per ASN
- */
- // Change /as#.html, use https://asn.cymru.com/ with IP annouced by ASN
- $data = file_get_contents('https://www.robtex.com/as/as62.html');
- preg_match_all('/[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}\/[0-9]{2}/', $data, $matches);
- foreach($matches[0] as $match)
- {
- echo $match . PHP_EOL;
- }
Advertisement
Add Comment
Please, Sign In to add comment