PHP code example of korra88 / email-list-verify-api-php-client
1. Go to this page and download the library: Download korra88/email-list-verify-api-php-client 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/ */
korra88 / email-list-verify-api-php-client example snippets
// composer autoloader
ilListVerify\APIClient(YOUR_API_KEY);
$email = "[email protected]";
try {
$status = $emailVerify->verifyEmail($email);
} catch (Exception $e) {
echo "\n" . $e->getMessage();
$status = false;
}
echo "\n{$email} status: " . ($status ? 'valid' : 'invalid')
$email_file_path = __DIR__ . '/email_list.csv';
$email_file_name = 'test_emails.csv';
try {
$file_id = $emailVerify->verifyApiFile($email_file_name, $email_file_path);
} catch (Exception $e) {
echo "\n" . $e->getMessage();
}
echo "\nCreated file {$file_id}.";
try {
$file_info = $emailVerify->getApiFileInfo($file_id);
echo "\nFile status: {$file_info->status}";
} catch (Exception $e) {
echo "\n" . $e->getMessage();
}