daveearley/Email-Validation-Tool

View on GitHub
index.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

use EmailValidation\EmailValidatorFactory;

require __DIR__ . '/vendor/autoload.php';

$validator = EmailValidatorFactory::create($_REQUEST['email'] ?? '');

header('Content-Type: application/json');
echo $validator->getValidationResults()->asJson();