PHP code example of struzik-vladislav / epp-ext-verisign-namestore
1. Go to this page and download the library: Download struzik-vladislav/epp-ext-verisign-namestore 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/ */
struzik-vladislav / epp-ext-verisign-namestore example snippets
use Psr\Log\NullLogger;
use Struzik\EPPClient\EPPClient;
use Struzik\EPPClient\Extension\Verisign\Namestore\NamestoreExtension;
use Struzik\EPPClient\Extension\Verisign\Namestore\Request\Addon\DefineNamestore;
use Struzik\EPPClient\Extension\Verisign\Namestore\Response\Addon\NamestoreError;
use Struzik\EPPClient\Extension\Verisign\Namestore\Response\Addon\NamestoreInfo;
use Struzik\EPPClient\Request\Domain\CheckDomainRequest;
// ...
$client->pushExtension(new NamestoreExtension('http://www.verisign-grs.com/epp/namestoreExt-1.1', new NullLogger()));
// ...
$request = new CheckDomainRequest($client);
$request->addDomain('example.com');
$request->addExtAddon(new DefineNamestore('dotCOM'));
$response = $client->send($request);
$namestoreInfo = $response->findExtAddon(NamestoreInfo::class);
if ($namestoreInfo instanceof NamestoreInfo) {
$subProduct = $namestoreInfo->getSubProduct();
}
$namestoreError = $response->findExtAddon(NamestoreError::class);
if ($namestoreError instanceof NamestoreError) {
$errorMessage = $namestoreError->getErrorMessage();
$errorCode = $namestoreError->getErrorCode();
}