PHP code example of brainfab / email-verification
1. Go to this page and download the library: Download brainfab/email-verification 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/ */
brainfab / email-verification example snippets
rainfab\EmailVerify\EmailVerify;
use Brainfab\EmailVerify\Provider\WhoisxmlapiProvider;
$apiKey = '';//your whoisxmlapi.com API key
$email = '[email protected]';//The email address to be verified.
$provider = new WhoisxmlapiProvider($apiKey);//create provider instance
$emailVerify = new EmailVerify($provider);
$result = $emailVerify->verify($email);
var_dump(
$result->getEmail(),
$result->getFormatCheck(),
$result->getSmtpCheck(),
$result->getDnsCheck(),
$result->getFreeCheck(),
$result->getDisposableCheck(),
$result->getCatchAllCheck(),
$result->getMxRecords()
);