- Email DNS Checker.
<?php
use EmailChecker\EmailChecker;
require "vendor/autoloader.php";
try {
$email = "[email protected]";
$validator = new EmailChecker($email);
$results = $validator->validate();
// Display results as a string
echo $validator->getResultsAsString();
// Display results as JSON
// echo $validator->getResultsAsJson();
} catch (Exception $e) {
echo "Error: ". $e->getMessage();
}