-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
23 additions
and
9 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,9 @@ | |
|
||
This is an easy way to check if a email address is acceptable so you can avoid fake/invalid users on your database. | ||
|
||
What this API does is check if the email address is correctly formatted, is from a disposable or temporary service and the domain is reachable. This way you can filter out spam and one-shot accounts decreasing the rate of fake or invalid accounts on your database. | ||
What this API does is check if the email address is correctly formatted, is from a disposable or temporary service and | ||
the domain is reachable. This way you can filter out spam and one-shot accounts decreasing the rate of fake or invalid | ||
accounts on your database. | ||
|
||
## Installation | ||
|
||
|
@@ -20,8 +22,20 @@ composer require masnathan/email-validator | |
## Usage | ||
|
||
```php | ||
$email-validator = new Masnathan\EmailValidator(); | ||
echo $email-validator->echoPhrase('Hello, Masnathan!'); | ||
use MASNathan\EmailValidator\EmailValidator; | ||
|
||
$emailValidator = new EmailValidator('email-validator8.p.rapidapi.com', 'super-secret-api-key'); | ||
|
||
$details = $emailValidator->check('[email protected]'); | ||
|
||
var_dump($details); | ||
// array:5 [ | ||
// "email" => "[email protected]" | ||
// "valid" => true | ||
// "disposable" => false | ||
// "mx_records" => true | ||
// "exists" => null | ||
// ] | ||
``` | ||
|
||
## Testing | ||
|
This file contains 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
This file contains 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
This file contains 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