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.

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:
    1
    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:
    1
    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
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    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
     
Loading...

Share This Page