1. Go to this page and download the library: Download fedek6/tld-mail-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/ */
fedek6 / tld-mail-validator example snippets
use Fedek6\TldMailValidator\TldMailValidator;
/** @var string $tldsFilePath */
$tldsFilePath = __DIR__ . '/../data/tlds-alpha-by-domain.txt';
/** @var array $addresses */
$addresses = email is OK. and has proper actual tld.';
} else {
echo 'Something\'s wrong with this address';
}
/** @var \Fedek6\TldMailValidator\TldMailValidator $validator */
$validator = new TldMailValidator($tldsFilePath, TldMailValidator::TEST_ALL);