Jump to content

API WHMCS domainregister don't work


aairedes

Recommended Posts

Hello everybody:

 

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);

curl_close($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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated