Acceleratic
Verified User
- Joined
- May 25, 2009
- Messages
- 55
Hi all,
I’am busy with making a control panel for my clients. Working like a charm with the DirectAdmin API. Now i’am getting with DNS configuration trough the API. Going good so far, except for adding nameservers. I’am using the following query with the httpsocket.php class:
$sock->query('/CMD_API_DNS_CONTROL',
array(
"action" => "add",
"domain" => $domain,
"type" => $dns_type,
"name" => $dns_name,
"value" => $dns_value
));
It’s going well for all the records except nameservers. When adding a namseserver like: ns1.domain.com, it’s switching the value and name variables. When adding trough normal DiractAdmin interface, the variables are set right (didn’t expect less).
Is this normal behaviour? The name variable needs to be set as “ns1.domain.com” and the value variable as “domain.com.”.
Greetings
I’am busy with making a control panel for my clients. Working like a charm with the DirectAdmin API. Now i’am getting with DNS configuration trough the API. Going good so far, except for adding nameservers. I’am using the following query with the httpsocket.php class:
$sock->query('/CMD_API_DNS_CONTROL',
array(
"action" => "add",
"domain" => $domain,
"type" => $dns_type,
"name" => $dns_name,
"value" => $dns_value
));
It’s going well for all the records except nameservers. When adding a namseserver like: ns1.domain.com, it’s switching the value and name variables. When adding trough normal DiractAdmin interface, the variables are set right (didn’t expect less).
Is this normal behaviour? The name variable needs to be set as “ns1.domain.com” and the value variable as “domain.com.”.
Greetings