cdfteller

Domain to IPs

Jan 20th, 2023
1,508
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.44 KB | None | 0 0
  1. <?php
  2.  
  3. echo "List Domain : ";
  4. $inputFile = fopen("php://stdin", "r");
  5. $file = trim(fgets($inputFile));
  6. $dom = file_get_contents($file, true);
  7. $search = array('http://','https://','/');
  8. $del = str_replace($search, '', $dom);
  9. $doms = explode("\r\n", $del);
  10.  
  11. foreach ($doms as $doms) {
  12.     //var_dump($doms);
  13.     $ips = gethostbyname($doms);
  14.     //echo $ips."\n";
  15.     $result = $ips."\n";
  16.     file_put_contents('result000.txt', $result, FILE_APPEND);
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment