Home > Backend Development > PHP Tutorial > PHP regular verification email function

PHP regular verification email function

WBOY
Release: 2016-07-25 08:55:01
Original
1458 people have browsed it
  1. function isemail($email) {
  2. return strlen($email) > 8 && preg_match("/^[-_+.[:alnum:]]+@((([ [:alnum:]]|[[:alnum:]][[:alnum:]-]*[[:alnum:]]).)+([a-z]{2,4})|(([0- 9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[2][5][0-5] ).){3}([0-9][0-9]?|[0-1][0-9][0-9]|[2][0-4][0-9]|[ 2][5][0-5]))$/i", $email);
  3. }
  4. if(!isemail($_POST['email'])) {
  5. echo "Sorry, the verification email address is incorrect! ";
  6. exit();
  7. }
  8. ?>
Copy code


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template