我正在使用 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"}}

如何解决此错误。

最佳答案

检查您的端口设置 -
$xmlapi->set_port(2083); //2082 if not using secure connection

关于php - Cpanel API 访问被拒绝,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/24995005/

10-10 17:44