How to check for a duplicate email address in PHP, considering Gmail (user.name+label@gmail.com) -


How can I check a duplicate email address in PHP with the possibility of automatic labeler of Gmail Punctuation in mind?

For example, I want to get them identified as duplicates:

  username@gmail.com user.name@gmail.com Username + Label @ Gmail .com user.name+label@gmail.com  

In spite of this, Daniel A. White claims: In Gmail, the dots at random places before '@' (and label) are as much as you'd like User.name@gmail.com and username@gmail.com are actually the same users.

  $ email_parse = explosion ('@', $ email); // Check whether there is a "+" and return the string before $ before_plus = strstr ($ email_ [0], '+', TRUE); $ Before_at = $ before_plus? $ Before_plus: $ email_parts [0]; // remove "." $ Before_at = str_replace ('.', '', $ Before_at); $ Email_clean = $ before_at '@'. $ Email_pairs [1];  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -