PHP code example of masnathan / email-validator

1. Go to this page and download the library: Download masnathan/email-validator library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

masnathan / email-validator example snippets


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
// ]