According to http://www.directadmin.com/features.php?id=504
I execute with no positive results (my A record for X domain with Y value stays as it was), why?
That's my code:
Delete a record:
CMD_API_DNS_CONTROL?domain=domain.com&action=select&selecttype=encoded
where "selecttype" is one of arecs0, nsrecs0, mxrecs0, cnamerecs0, ptrrecs0 (0 and be any number, generally starting from zero, going up).
and also where "encoded" is the url encoded version of:
name=www&value=1.2.3.4
Basicaly, just replace the =, and & characters to html encoded charctes so that DA doesnt thing they are url separators. Take a look at the html generated in the CMD_DNS_CONTROL page for examples (the code is the same to handel the API and the CMD_API_DNS_CONTROL, it just uses different output).
I execute with no positive results (my A record for X domain with Y value stays as it was), why?
That's my code:
PHP:
$propertyQueryName = "{$conf["SUBDOMAINNAME"]}.{$conf["DOMAINNAME"]}.";
$propertyDeleteEncoded = urlencode("name={$propertyQueryName}&value={$oldIP}");
include 'httpsocket.php';
// connection & settings
$sock = new HTTPSocket;
$sock->connect($conf["SERVERIP"], 2222);
$sock->set_login($conf["USERNAME"],$conf["PASSWORD"]);
$sock->set_method('POST');
// remove old record
$sock->query('/CMD_API_DNS_CONTROL',
array(
'action' => 'select',
'selecttype' => $propertyDeleteEncoded,
'domain' => $conf["DOMAINNAME"],
));