I'm sure I'm missing something but if I do the following:
I'm getting the following:Code:include("xmlapi.php"); $ip = "hostname.com"; $root_pass = "password"; $account = "account"; $xmlapi = new xmlapi($ip); $xmlapi->hash_auth("user",'MYHASHDATA'); $xmlapi->set_output('json'); $xmlapi->set_debug(1); $res = $xmlapi->api2_query($account, "Email", "listpops"); print_r($res);
Here is the error log:Code:{"apiversion":"2","data":{"reason":"api call failed. Module name is required.","result":"0"},"type":"text"}
Here is the version information:Code:[Wed Mar 03 13:24:06 2010] [error] [client IP] DATA: user=user&cpanel_xmlapi_module=Email&cpanel_xmlapi_func=listpops&cpanel_xmlapi_apiversion=2, referer: http://ip/test/
cPanel 11.25.0-R43473 - WHM 11.25.0 - X 3.9
FWIW: This exact code (outside of set_output part) works fine and returns a simplexml object.



LinkBack URL
About LinkBacks
Reply With Quote





