1. Go to this page and download the library: Download printnow/free-email-checker 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/ */
printnow / free-email-checker example snippets
use Printnow\FreeEmailChecker\Checker;
$checker = new Checker();
$result = $checker->check('[email protected]');
if ($result->isFree()) {
echo "这是免费邮箱: " . $result->getDomain();
} else {
echo "这不是免费邮箱";
}
use Printnow\FreeEmailChecker\Laravel\FreeEmailFacade as FreeEmail;
$result = FreeEmail::check('[email protected]');
if ($result->isFree) {
// 处理免费邮箱逻辑
}
use Illuminate\Validation\Validator;
use Printnow\FreeEmailChecker\Laravel\FreeEmailFacade as FreeEmail;
Validator::extend('not_free_email', function ($attribute, $value) {
return !FreeEmail::check($value)->isFree;
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.