Hello my friends!
I'm try to use the XML API class 1.0 to create accounts at my WHM cPanel reseller account. (createacct_example.php).
But nothing happens, return a blank screen! maybe because my account is a Reseller type not a VPS Server or Dedicated Server.PHP Code:$ip = "www.domain.com";
$root_pass = "pass";
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth("domain",$root_pass);
$xmlapi->set_debug(1);
$acct = array( plan => "plan_plus", username => "band", password => "test123", domain => "band.domain.com", contactemail => "email@domain.com");
print $xmlapi->createacct($acct);
Other example (api2_example.php)
Return nothing:PHP Code:include("xmlapi.php");
$ip = "www.domain.com";
$root_pass = "pass";
$account = "subdomain.domain.com";
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth("domain",$root_pass);
$xmlapi->set_output("json");
$xmlapi->set_debug(1);
print $xmlapi->api2_query($account, "Email", "listpopswithdisk" );
My Cpanel WHM version is:Code:{"data":{"reason":"Access denied","result":"0"},"type":"text"}
cPanel 11.25.0-S43473 - WHM 11.25.0 - X 3.9
CENTOS 5.4 i686 virtuozzo on sv1021
Thanks!


LinkBack URL
About LinkBacks
Reply With Quote