User Guide and Documentation

ModifyCNS() - Child Nameserver UpdateRelease Date: 2019/07/30

It is used to change the address of child nameserver of the domain name, if not supported, an error message appears.

public function ModifyCNS($params=[],$old=[],$new_ns='',$new_ip=''){
    $domain     = idn_to_ascii($params["domain"],0,INTL_IDNA_VARIANT_UTS46);

    $old_ns      = idn_to_ascii($old["ns"],0,INTL_IDNA_VARIANT_UTS46);
    $new_ns      = idn_to_ascii($new_ns,0,INTL_IDNA_VARIANT_UTS46);

    $modify     = $this->api->modify_child_nameserver($domain,$old_ns,$new_ns,$new_ip);
    if(!$modify){
        $this->error = $this->api->error;
        return false;
    }

    return true;
}

Parameters;

  • $params Provides the value of [options] index in the $order variable in the class.
  •  $old Former Nameserver information, example: Array([ns] => ns1.example.com, [ip] => 192.168.1.1)  
  • $new_ns Name of Nameserver, example: example.com
  • $new_ip IP address of new Nameserver, example: 192.168.1.1

Retrieval Value;

Boolean (true or false) should be displayed.

Copyright © 2019. All rights reserved.
Top