Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cannot get the API to respond when using PHP API Wrapper class ..

Discussion in 'cPanel Developers' started by webnoob, Jun 4, 2011.

  1. webnoob

    webnoob Member

    Joined:
    Jun 3, 2011
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    51
    Hi All,

    I am using the following code:

    PHP:
    $account "accountUserNameForCPanel";
    $xmlapi = new xmlapi('IpToDomain');
    $xmlapi->password_auth('myrootuser''myrootpass');
    $xmlapi->set_debug(1);
    print 
    $xmlapi->api1_query($account'SubDomain''addsubdomain', array('subdomain''mydomain.com'00'/public_html/'));
    The problem is that my subdomain isn't created. In fact, when I run any of the examples, they don't work either. I do get an error when I don't enter auth details so it is speaking to the class OK, just doesn't see to work with the API.

    Any ideas?
     
    #1 webnoob, Jun 4, 2011
    Last edited: Jun 4, 2011
  2. webnoob

    webnoob Member

    Joined:
    Jun 3, 2011
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    51
    Nevermind, managed to get this working fine. Turns out the password was incorrect :eek:
     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice