Editing DNS records with CMD_API_DNS_ADMIN

am117

New member
Joined
Nov 19, 2018
Messages
2
I'm using edit feature of the API CMD_API_DNS_ADMIN to edit (mail,pop,smtp) A records of domains. I wrote the code below in PHP and It's working, but only sometimes. There are cases that adding the record is successful but deleting the old record didn't happen. How can I check the reason and solve the issue?

Code:
    include_once 'httpsocket.php';
    $sock = new \HTTPSocket;
    $sock->connect(WEB_SERVER_DA_IP, WEB_SERVER_DA_PORT);
    $sock->set_login(WEB_SERVER_DA_ADMIN_LOGIN, WEB_SERVER_DA_PASSWORD_LOGIN);

    $sock->set_method('POST');

    $sock->query(
        '/CMD_API_DNS_ADMIN',
        array(
            'domain' => $domain,
            'action' => 'edit',
            'arecs0' => "name=mail&value=" . SERVER_IP,
            'type' => 'A',
            'name' => 'mail',
            'value' => MAIL_SERVER,
        )
    );
 
Hello,




add var_dump($result); for example.




PHP:
    $sock->query(
        '/CMD_API_DNS_ADMIN',
        array(
            'domain' => $domain,
            'action' => 'edit',
            'arecs0' => "name=mail&value=" . SERVER_IP,
            'type' => 'A',
            'name' => 'mail',
            'value' => MAIL_SERVER,
        )
    );
var_dump($result);


and search the forums, there similar threads already existing.
 
Last edited:
Back
Top