Developer Center

addCNS() - Add Child Nameserver

It is used to add a child nameserver to the domain name, if not supported, an error message appears.

public function addCNS($params=[],$ns='',$ip=''){
    $domain     = idn_to_ascii($params["domain"],0,INTL_IDNA_VARIANT_UTS46);
    $ns         = idn_to_ascii($ns,0,INTL_IDNA_VARIANT_UTS46);

    $addCNS = $this->api->add_child_nameserver($domain,$ns,$ip);
    if(!$addCNS){
        $this->error = $this->api->error;
        return false;
    }

    return ['ns' => $ns,'ip' => $ip];
}

Parameters;

  • $params Provides the value of [options] index in the $order variable in the class.
  • $ns Nameserver name, example: example.com
  • $rope Nameserver IP address, example: 192.168.1.1

Retrieval Value;

Array
(
    [ns] => ns1.example.com
    [ip] => 192.168.1.1
)
CNSList() - Child Nameserver List ModifyCNS() - Child Nameserver Update

Do you have any questions?

Feel free to contact us
Contact Us
Copyright © 2024. All Rights Reserved.
Join Our Discord Channel
Top