Skip to content

Instantly share code, notes, and snippets.

@jagoanbangetz
Created July 21, 2020 13:08
Show Gist options
  • Select an option

  • Save jagoanbangetz/a4cda832c1b6c13fe1ce3fc524502c91 to your computer and use it in GitHub Desktop.

Select an option

Save jagoanbangetz/a4cda832c1b6c13fe1ce3fc524502c91 to your computer and use it in GitHub Desktop.
Remove Duplicate Domains
<?php
// duplicate domain remove
// coded by galehdotid
// set name file to domain.txt
// run php remove.php
// enjoy and still wait
ini_set('memory_limit', '8192M');
$arr = file_get_contents("domain.txt");
$to_array = explode("\n", $arr);
$unique = array_unique($to_array);
print_r(count($unique));
file_put_contents("duplicate_domains_result.txt", implode("\n", $unique));
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment