I am trying to pull an account summary from one of the accounts, this is the code I have
I get a php error, and access denied, as belowPHP Code:<pre>
<?php
# cpanel12 - api2_example.php Copyright(c) 1997-2009 cPanel, Inc.
# All Rights Reserved.
# copyright@cpanel.net http://cpanel.net
include("xmlapi.php.inc");
$ip = "blogforfree.net";
$root_pass = "xxxxxxx";
$account = "freeblog";
$xmlapi = new xmlapi($ip);
$xmlapi->password_auth("blogforf",$root_pass);
$xmlapi->set_debug(1);
//print $xmlapi->api2_query($account, "Ftp", "listftpwithdisk" );
print $xmlapi->api2_query(accountsummary, $account);
?>
Why is that?.. What am I doing wrong?PHP Code:
Warning: Missing argument 3 for xmlapi::api2_query(), called in /home/blogforf/public_html/includes/api2_example.php on line 21 and defined in /home/blogforf/public_html/includes/xmlapi.php.inc on line 112
Warning: Missing argument 4 for xmlapi::api2_query(), called in /home/blogforf/public_html/includes/api2_example.php on line 21 and defined in /home/blogforf/public_html/includes/xmlapi.php.inc on line 112
RAW API2 CALL:
freeblog
QUERY:
https://blogforfree.net:2087/xml-api/cpanel?user=accountsummary&xmlin=%3Ccpanelaction%3E%3Cmodule%3Efreeblog%3C%2Fmodule%3E%3Cfunc%3E%3C%2Ffunc%3E%3Cargs%3E%3C%2Fargs%3E%3C%2Fcpanelaction%3E
RAW XML:
1textAccess Denied to accountsummary.
object(SimpleXMLElement)#2 (3) {
["apiversion"]=>
string(1) "1"
["type"]=>
string(4) "text"
["data"]=>
object(SimpleXMLElement)#3 (1) {
["result"]=>
string(32) "Access Denied to accountsummary."
}
}
SIMPLEXML OBJ:



LinkBack URL
About LinkBacks
Reply With Quote






