The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    1
    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:
    1
    Nevermind, managed to get this working fine. Turns out the password was incorrect :eek:
     
Loading...

Share This Page