Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- Coded By Aniki
- 26 april 2018
- http://kimsohyun.net
- */
- echo "===== PPQToolz - Email Extract [ Remove Duplicat ] ===== \n";
- echo "====================================================";
- echo "\n Select Mailist : " ;$list = trim(fgets(STDIN));
- //cek file
- if(!file_get_contents($list)){
- die("\nFile Not Found ! ");
- }
- $mailist = file_get_contents($list);
- echo "Save to : "; $filetujuan = trim(fgets(STDIN));
- // extract mail & get info
- if(preg_match("/live =>/",$mailist)){
- $mailist = str_replace("live => ","",$mailist);
- }
- $mail = explode("\n",$mailist);
- $r_mail = array_unique($mail);
- $before = count($mail) - count($r_mail);
- //Tampilkan & Save
- foreach( $r_mail as $emel ) {
- echo "[ Duplicat Removed ] ".$emel."\n";
- $buka = fopen("$filetujuan","a");
- fwrite($buka,$emel);
- fwrite($buka,"\n");
- fclose($buka);
- }
- //tanjukkan info
- echo "\n Total Mailist : ".count($mail)."\n Removed : ".$before."\n Result : ".count($r_mail);
- echo"\n Check in /$filetujuan \n";
- echo "powered by kimsohyun.net \n";
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement