PHP code example of hades-architect / united-domains

1. Go to this page and download the library: Download hades-architect/united-domains 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/ */

    

hades-architect / united-domains example snippets


$client = new \HadesArchitect\UnitedDomains\ClientFacade($username, $password);
$records = $client->getRecords('my-domain.com');
if ($client->isDomainFree('example.com')) { ... }

$client = new \HadesArchitect\UnitedDomains\Client($username, $password);
$response = $client->call('CheckDomain', ['domain' => 'example.com']);
echo $response;

// Client
$client = new \HadesArchitect\UnitedDomains\TraceableClient($username, $password);
// Logger 
$client->setLogger(
    new \Monolog\Logger(
        'ud_api',
        [new \Monolog\Handler\StreamHandler('php://stdout', \Monolog\Logger::DEBUG)],
        [new \Monolog\Processor\PsrLogMessageProcessor()]
    )
);
$client->enableDebug();
$response = $client->call('CheckDomain', ['domain' => 'example.com']);
echo $response;