PHP code example of leo108 / email-fake-filter
1. Go to this page and download the library: Download leo108/email-fake-filter 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/ */
leo108 / email-fake-filter example snippets
use EmailFakeFilter\EmailFakeFilter;
if (EmailFakeFilter::isFakeDomain('mailinator.com')) {
// This is a disposable/one-time domain
} else {
// This is not a disposable/one-time domain
}
// Check if an email address is a disposable/one-time email address
if (EmailFakeFilter::isFakeEmail('[email protected]')) {
// This is a disposable/one-time email address
} else {
// This is not a disposable/one-time email address
}
// Get information about a domain
$info = EmailFakeFilter::getDomainInfo('mailinator.com');
if ($info !== null) {
// This is a disposable/one-time domain, and $info contains additional information about it
} else {
// This is not a disposable/one-time domain
}