PHP code example of swolebrain / ahrdmail-client-php

1. Go to this page and download the library: Download swolebrain/ahrdmail-client-php 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/ */

    

swolebrain / ahrdmail-client-php example snippets





 Configure API key authorization: smithy.api.httpApiKeyAuth
$config = Ahrdmail\Client\Configuration::getDefaultConfiguration()->setApiKey('x-api-key', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Ahrdmail\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('x-api-key', 'Bearer');


$apiInstance = new Ahrdmail\Client\Api\DefaultApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$check_email_identity_dns_request_content = new \Ahrdmail\Client\Model\CheckEmailIdentityDnsRequestContent(); // \Ahrdmail\Client\Model\CheckEmailIdentityDnsRequestContent

try {
    $result = $apiInstance->checkEmailIdentityDns($check_email_identity_dns_request_content);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->checkEmailIdentityDns: ', $e->getMessage(), PHP_EOL;
}