Created
September 17, 2014 17:59
-
-
Save saaiful/9564faddfd561e96884a to your computer and use it in GitHub Desktop.
Gmail Email Filter
This file contains hidden or 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 | |
function fraud_gmail($user_email) | |
{ | |
$user_email = strtolower($user_email); | |
$data = explode('@', $user_email); | |
if(count($data)===2) | |
{ | |
if(preg_match("/g(oogle)?mail(.*)/", $data[1], $ext)) | |
{ | |
$trick = explode('+', $data[0]); | |
if(count($trick)>0) | |
{ | |
$data[0] = $trick[0]; | |
} | |
$user_email = str_replace(array('.','+'), '', $data[0]).'@gmail'.$ext[2]; | |
} | |
} | |
return $user_email; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment