Hello,
I've a problem with a API command. I'll use the following command:
Get List of Users owned by Reseller.
I have a reseller account and not a dedicated server with a admin account. But I want to see my accounts that I created in my reseller account.
I'll use the following code:
<?php
$reseller = $_POST[reseller];
include '../config/config.php';
include '../protocol/httpsocket.php';
$Socket = new HTTPSocket;
$Socket->connect($siteurl,$siteport);
$Socket->set_login($adminusername,$adminpassword);
if (strlen(trim($reseller)) > 0 ) {
$Socket->query('/CMD_API_SHOW_USERS',
array(
'reseller' => $reseller
));
} else {
$Socket->query('/CMD_API_SHOW_USERS',
array( ));
}
$result = $Socket->fetch_parsed_body();
if ( $Socket->get_status_code() != 200 || !empty($result['error']) )
{
echo "Failed to get list of accounts: {$result['text']}<br />{$result['details']}";
} else {
echo $result;
}
?>
But when i fill in my reselleraccountname in the form that I use for this code, I will get a error, because I have not the rights for this.
Can someone help me with this.
I'm sorry for my English.
Kind Regards,
Paul
I've a problem with a API command. I'll use the following command:
Get List of Users owned by Reseller.
I have a reseller account and not a dedicated server with a admin account. But I want to see my accounts that I created in my reseller account.
I'll use the following code:
<?php
$reseller = $_POST[reseller];
include '../config/config.php';
include '../protocol/httpsocket.php';
$Socket = new HTTPSocket;
$Socket->connect($siteurl,$siteport);
$Socket->set_login($adminusername,$adminpassword);
if (strlen(trim($reseller)) > 0 ) {
$Socket->query('/CMD_API_SHOW_USERS',
array(
'reseller' => $reseller
));
} else {
$Socket->query('/CMD_API_SHOW_USERS',
array( ));
}
$result = $Socket->fetch_parsed_body();
if ( $Socket->get_status_code() != 200 || !empty($result['error']) )
{
echo "Failed to get list of accounts: {$result['text']}<br />{$result['details']}";
} else {
echo $result;
}
?>
But when i fill in my reselleraccountname in the form that I use for this code, I will get a error, because I have not the rights for this.
Can someone help me with this.
I'm sorry for my English.
Kind Regards,
Paul