https://github.com/farisc0de/email_validation
Simple PHP snippet to validate emails server side
https://github.com/farisc0de/email_validation
Last synced: 4 months ago
JSON representation
Simple PHP snippet to validate emails server side
- Host: GitHub
- URL: https://github.com/farisc0de/email_validation
- Owner: farisc0de
- License: mit
- Created: 2020-12-19T05:48:17.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2022-01-05T01:06:13.000Z (over 4 years ago)
- Last Synced: 2024-12-31T07:43:37.600Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 (blah@abc.tld)
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
```php
if(isValid("user@hotmail.com")){
echo "This is a valid email";
} else {
echo "Please enter a valid email";
}
```
## Copyright
FarisCode