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!

im getting no output on acct create

Discussion in 'cPanel Developers' started by exverse, Jan 14, 2011.

  1. exverse

    exverse Registered

    Joined:
    Jan 14, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    the acctcreate makes the accounts but im getting no output at all that it is created

    PHP:
    <?php

    include("xmlapi.php");

    $ip "127.0.0.1";
    $root_pass "********";

    $xmlapi = new xmlapi($ip);
    $xmlapi->password_auth("*******",$root_pass);

    $xmlapi->set_debug(0);


    $acct = array( username => "someuser"password => "pass123"domain => "thisdomain.com"plan => "techknow_200mb");

    print 
    $xmlapi->createacct($acct);


    ?>              
     
  2. exverse

    exverse Registered

    Joined:
    Jan 14, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    ok i figured out how to get the output... now im trying to figure out how to parse it :\ any ideas?
     
  3. cPanelDavidN

    cPanelDavidN Integration Developer

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi exverse,

    The PHP XML-API client class will return a SimpleXML object by default with calling the xmlapi_query(), api1_query() and api2_query() methods.

    You can change this behavior by specifying the output with $xmlapi->set_output($type). $type can be "array" for a simple array structure, "json" for a JSON structure, and "xml" for XML structure. This should all be documented inside the PHP XML-API client class.

    Best Regards,
    -DavidN
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
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