CMD_API_DNS_ADMIN exists in reseller account?

HSG

Verified User
Joined
Oct 7, 2015
Messages
31
Hi,
This code is only works in a admin user:

PHP:
<?php
$sock = new HTTPSocket;
$sock->connect(IP, 2222);
$sock->set_login('admin', password);
$sock->set_method('POST');
$sock->query('/CMD_API_DNS_ADMIN', array('domain' => 'domain', 'action' => 'exists'));
$result = $sock->fetch_parsed_body();
if($result['exists'] !== '0'){
	echo "that domain is exists.";
}
?>

I want to run this code in a reseller account with DNS Control access, how?
Thanks.
 
Please don't start upping 6 year old threads for your question, you won't be helped faster. If somebody knows, they will help you.
Otherwise write a support ticket to directadmin if it's that urgent.
 
Please don't start upping 6 year old threads for your question, you won't be helped faster. If somebody knows, they will help you.
Otherwise write a support ticket to directadmin if it's that urgent.

OK, sorry for upping.
 
Oke.
Maybe an alternative. I let the customer do a whois check to see if the domain name is available.
If available, they get a link to register the domain to their account with the api.
 
DA does have a tool for that. The command is:
CMD_AJAX_CHECK_DOMAIN?domain=domain.com&rand=1873489734

If the domain already exists, it will spit out something like this:
Code:
document.getElementById("domain_result").innerHTML="Already Exists";
document.getElementById("domain").focus();
document.getElementById("domain").select();
document.getElementById("domain").style.backgroundColor="#ffd6d6";
But can also generate output if the name is invalid, or cannot be used for whatever reason, etc.

The domain_result ID would be set to "" if it's ok to use.

John
 
Back
Top