Resellerclub测试域名注册api调用

时间:2016-10-31 06:55:14

标签: php api dns

尝试使用resellerclub模拟帐户http://cp.onlyfordemo.net/reseller注册域名时获取错误响应。

回复消息:"错误您不能执行此操作"。

$apiUrl = 'https://test.httpapi.com';
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $apiUrl . '/api/domains/register.xml');
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);

curl_setopt($ch, CURLOPT_POST,TRUE);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

// Set the request as a POST FIELD for curl.
curl_setopt($ch, CURLOPT_POSTFIELDS, 'auth-userid=' . $resellerId . '&api-key=' . $apiKey . '&domain-name=' . $domain . '&years=' . $domain_list[$domain_name] . '&ns=glen669774.earth.orderbox-dns.com&ns=glen669774.mars.orderbox-dns.com&customer-id=' . $customerId . '&reg-contact-id='. $contacthash["registrantcontactid"] . '&admin-contact-id='.$contacthash["admincontactid"].'&tech-contact-id='.$contacthash["technicalcontactid"].'&billing-contact-id='.$contacthash["billingcontactid"].'&invoice-option='.$invoiceOption.'&protect-privacy=false');

$httpResponse = curl_exec($ch);

请提前告知我们如何解决此问题。

1 个答案:

答案 0 :(得分:1)

first Whitelist your ip

首先在Resellerclub管理区域将您的IP列入白名单以进行api通话

http://heavens.co.in/resellerclub-api