有人可以协助体验域名盒API和PHP吗?


can someone assist with experiance of the domainbox api and php please

有人有使用 domainbox.com API的经验吗?我以前从未做过这样的事情,任何帮助将不胜感激。我正在尝试做的是使用 php 发送请求并带回在页面上显示它们的结果,但老实说,我什至不知道从哪里开始,或者这是否是最好的方法。

.html

<form action="searchdomain.php" method="post">
domain: <input type="text" name="domainname">
<input type="submit">
</form>

.php

<?php
$client = new SoapClient('https://live.domainbox.net/?WSDL', array('soap_version' => SOAP_1_2));

// populate the inputs....
    $params = array(
       'AuthenticationParameters' => array(
          'Reseller' => 'pulseinternet',
          'Username' => 'roy_admin',
          'Password' => '*********'
        ),
        'CommandParameters' => array(
            'DomainName' => '($_POST["domainname"])',
            'LaunchPhase' => 'GA'
        )
    );
$result = $client->CheckDomainAvailability($params, AvailabilityStatus);
print_r($result);
?>

结果

stdClass Object ( [CheckDomainAvailabilityResult] => stdClass Object ( [ResultCode] => 250 [ResultMsg] => TLD '' not supported [TxID] => d015865c-b99e-400f-94b9-badf89b0216f [AvailabilityStatus] => 3 [AvailabilityStatusDescr] => ErrorOccurred [LaunchPhase] => GA [DropDate] => [BackOrderAvailable] => [AdditionalResults] => stdClass Object ( ) ) )

提前感谢罗伊

这里有一个工作示例:

$dom = 'test12309go.com';
$tld = '.com,.net,.org';
//$client = new SoapClient('https://sandbox.domainbox.net/?WSDL', array('trace' => true, 'soap_version' => SOAP_1_2));
$client = new SoapClient('https://live.domainbox.net/?WSDL', array('trace' => true, 'soap_version' => SOAP_1_2));
$params = array(
    'AuthenticationParameters' => array(
        'Reseller' => 'MyReseller',
        'Username' => 'MyUsername',
        'Password' => 'MyPassword'
    ),
    'CommandParameters' => array(
        'DomainName' => $dom,
    'TLDs' => $tld,
    'Limit' => '10',
    'CheckAtRegistry' => true,
      'DomainCheck' => array(
        'Include' => true
      ),
      'NameSuggestions' => array(
        'Include' => false
      ),
      'PremiumDomains' => array(
        'Include' => false
      ),
  )
);
$result = $client->CheckDomainAvailabilityPlus($params);
//echo $client->__getLastRequest();
print_r($result);