I'm using the API of WHMCS and it's works all that i do.
But domainregister don't work. I want to send to register the id of domain that i want to register.
My code is:
$postfields = array();
$postfields["username"] = "xxx";
$postfields["password"] = "xxx";
$postfields["accesskey"] = "xxx";
$postfields["action"] = "domainregister";
$postfields["domainid"] = 623; // id of the domain
foreach($params as $k => $v)
$postfields[$k] = utf8_encode($v);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $this->url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
The problem is $data is always in blank. No error. No success. Always in blank.
¿Need i another parameter in domainregister? ¿Do you have some example to send the domain to the register?
I expect your answer. Thank you very much.