API for A records

ximple

Verified User
Joined
Jul 3, 2010
Messages
12
Hi,

Is it possible to make and delete A records with the DA API?
So yes, how do it works.

Thx,

Ximple
 
Oke thx.

Hope it also works on with the new API..
-------------------
Thx, it work!

<?php

include('HTTPSocket.php');

$sock = new HTTPSocket;
$server_ip='1.2.3.4';
$server_login='admin';
$server_pass="password";
$server_ssl="N";
$sock->connect($server_ip, 2222);
$sock->set_login($server_login,$server_pass);
$sock->query('/CMD_API_DNS_CONTROL',
array(
'domain' => 'domain',
'action' => 'add',
'type' => 'A',
'name' => 'test',
'value' => '1.2.3.4',
));
$result = $sock->fetch_parsed_body();

?>
------------------------------------------------------

For deleting..

<?php

include('HTTPSocket.php');

$sock = new HTTPSocket;
$sock->connect('ip',2222);
$sock->set_login('user','password');
$sock->query('/CMD_API_DNS_CONTROL?domain=&action=select&arecs0='.urlencode('name=test&value=1.2.3.4'));
$result = $sock->fetch_parsed_body();

?>
 
Last edited:
Back
Top