Created
June 16, 2020 17:06
-
-
Save galehrizky/3e36ee863fce2b8a1297ab2590d1ba66 to your computer and use it in GitHub Desktop.
Domain Generator
This file contains 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 | |
// Generate list Domain Names | |
error_reporting(0); | |
function save($sites, $filename) | |
{ | |
$file = fopen($filename,"a"); | |
fwrite($file, "\n". $sites); | |
fclose($file); | |
} | |
for ($i=0; $i < 100000; $i++) { | |
$url = file_get_contents("https://api.namefake.com/"); | |
$json_decode = json_decode($url, TRUE); | |
if ( gethostbyname($json_decode['domain']) != $json_decode['domain'] ) { | |
save($json_decode['domain'], 'list-domain.txt'); | |
echo "Valid domain {$json_decode['domain']}".PHP_EOL; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment