Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 581 Bytes

README.md

File metadata and controls

36 lines (24 loc) · 581 Bytes

PHP Email Validation

Simple PHP code to validate emails server side

I wrote this code 2 years ago

It's a simple way to protect your contact form from spam emails

  1. Validate Email Format ([email protected])
  2. Ping Email Domain to make sure it's online
  3. Validate Email Provider from the list
    • Gmail.com
    • Hotmail.com
    • Outlook.com
    • msn.com
    • Outlook.sa
    • aol.com
    • protonmail.com

How to use

if(isValid("[email protected]")){

  echo "This is a valid email";
  
} else {

  echo "Please enter a valid email";
  
}

Copyright

FarisCode