Advertisement
shor7cut

php filter email

Oct 27th, 2016
1,756
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function save($data,$name){
  2.     $fopn = fopen($name, "a+");
  3.     fwrite($data."\r\n", $fopn);
  4.     fclose($fopn);
  5. }
  6. $file = explode("\r\n", file_get_contents("filname.txt"));
  7. foreach ($file as $key => $email) {
  8.     if(eregi("gmail.com", $email)){
  9.         save($email,"gmail.txt");
  10.         echo $email."\r\n";
  11.     }
  12.     if(eregi("yahoo.com", $email)){
  13.         save($email,"yahoo.txt");
  14.         echo $email."\r\n";
  15.     }
  16. }
Advertisement
RAW Paste Data Copied
Advertisement