upmind/domainnameapi-sdk

DomainNameApi.com SDK generated using wsdltophp/packagegenerator with a simple entry-point and PSR-3 logging capabilities

v1.1 2024-07-11 16:45 UTC

This package is auto-updated.

Last update: 2024-12-11 17:35:28 UTC


README

Latest Version on Packagist

DomainNameApi PHP SDK automatically generated from the DomainNameApi WSDL using WsdlToPhp / PackageGenerator.

Installation & Usage

Requirements

PHP 7.4 and later.

Composer

To install the package via Composer, run the following install command:

composer require upmind/domainnameapi-sdk

Manual Installation

Download the files and include autoload.php:

<?php

require_once('/path/to/upmind/domainnameapi-sdk/vendor/autoload.php');

Getting Started

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();
// ...

Author

License

MIT License. Please see License File for more information.

Upmind

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.