DomainNameApi PHP SDK automatically generated from the DomainNameApi WSDL using WsdlToPhp / PackageGenerator.
PHP 7.4 and later.
To install the package via Composer, run the following install command:
composer require upmind/domainnameapi-sdk
Download the files and include autoload.php
:
<?php
require_once('/path/to/upmind/domainnameapi-sdk/vendor/autoload.php');
Please follow the installation procedure and then run the following:
<?php
use Upmind\DomainNameApiSdk\ClientFactory;
require_once(__DIR__ . '/vendor/autoload.php');
/** @var \Upmind\DomainNameApiSdk\Client $client */
$client = (new ClientFactory())->create($username, $password, ClientFactory::ENV_TEST, $psr3Logger);
$request = (new GetDetailsRequest())->setDomainName($domain);
$response = $client->GetDetails(new GetDetails($request));
$result = $response->getGetDetailsResult();
$domainInfo = $result->getDomainInfo();
if (!$domainInfo) {
throw new RuntimeException(sprintf('API Error (%s): %s', $result->getErrorCode(), $result->getOperationMessage()));
}
/** @var \Upmind\DomainNameApiSdk\SDK\StructType\DomainInfo $domainInfo */
$status = $domainInfo->getStatus();
$nameservers = $domainInfo->getNameServerList();
$expiryDate = $domainInfo->getExpirationDate();
// ...
MIT License. Please see License File for more information.
Sell, manage and support web hosting, domain names, ssl certificates, website builders and more with Upmind.com - the ultimate web hosting billing and management solution.