jonniejoejonson

Registered
Jul 19, 2011
2
0
51
include("../xmlapi.php");

$ip = 'localhost';
$root_pass = 'this_is_the_password_I_use_to_loginto_cpanel';
$account = "this_is_the_username_I_use_to_loginto_cpanel";

$xmlapi = new xmlapi($ip);
$xmlapi->password_auth("root",$root_pass);
$xmlapi->set_output("json");


print $xmlapi->listparkeddomains($account, null);

I keep getting an access denied printout... am i using the right pasword or anyideas where i am going wrong?... kind regards J
 

jonniejoejonson

Registered
Jul 19, 2011
2
0
51
Boom... found the answer on the forums... set a diff port cos im not root user...

$xmlapi = new xmlapi($ip);
$xmlapi ->set_port(2083);
$xmlapi->password_auth($username,$root_pass);
$xmlapi->set_output("json");