I'm trying to list all domains including domain pointers using the API. I currently have the following code:
The CMD_API_DOMAIN_POINTER command however only returns "Could not execute your request" and "You do not own that domain".
Am I doing this the right way?
PHP:
//list users
$sock->query('/CMD_API_SHOW_USERS');
$users=$sock->fetch_parsed_body();
foreach($users['list'] as $user) {
//get domains for user
$sock->query(
'/CMD_API_SHOW_USER_DOMAINS',
array(
'user'=>$user
)
);
$domains=$sock->fetch_parsed_body();
echo str_replace('_', '.', $domain).'<br>';
//print_r($domains);
foreach($domains as $domain=>$data) {
//get domain pointers for domain
$sock->query(
'/CMD_API_DOMAIN_POINTER',
array(
'domain'=>str_replace('_', '.', $domain)
)
);
$domain_pointers=$sock->fetch_parsed_body();
print_r($domain_pointers);
}
}
The CMD_API_DOMAIN_POINTER command however only returns "Could not execute your request" and "You do not own that domain".
Am I doing this the right way?