Cpanel API访问被拒绝

时间:2014-07-28 12:12:14

标签: php api cpanel

我正在使用XML api 2

$xmlapi = new xmlapi('MY IP Address');
$xmlapi->password_auth("root",'My Cpanel password');
$xmlapi->set_output("json");

$xmlapi->set_debug(1);
print $xmlapi->api2_query($account, "Email", "listpopswithdisk" );

但是它给出了这个错误。

{"cpanelresult":{"apiversion":"2","error":"Access denied","data":{"reason":"Access denied","result":"0"},"type":"text"}}

如何解决此错误。

1 个答案:

答案 0 :(得分:0)

检查您的端口设置 -

$xmlapi->set_port(2083); //2082 if not using secure connection