dnsAddRecord
Purpose
Add new record into DNS zone.
Attributes
- domainid - Domain ID OR
- domain - The domain name
- name - The record name
- type - The DNS record type (SOA, NS, A, AAAA, CNAME, MX, TXT, SRV)
- content - Record value - base64_encode
- prio - The record's preference
- ttl - The record's Time To Live
Example Command
$postfields = array(); $postfields["responsetype"] = "json"; $postfields["action"] = "dnsAddRecord"; $postfields['domain'] = 'domain.hu'; $postfields['name'] = 'teszt.domain.hu'; $postfields['type'] = 'A'; $postfields['content'] = '192.168.1.1'; $postfields['ttl'] = '3600'; $result = mikrovps_SendCommand( $postfields );
Successful Response
Array ( [status] => success [code] => RECORD_ADDED [value] => domain.hu [description] => Record has been added to: domain.hu )
Error Response
result = error code = XXX description = YYYError code and message