Developer Center

CNSList() - Child Nameserver List

It is used to retrieve the child nameserver information of the domain name, if not supported, an empty array should be returned.

public function CNSList($params=[]){
    $domain     = idn_to_ascii($params["domain"],0,INTL_IDNA_VARIANT_UTS46);

    $get_list    = $this->api->get_child_nameservers($domain);
    if(!$get_list && $this->api->error){
        $this->error = $this->api->error;
        return false;
    }

    $data     = [];
    $i        = 0;

    if($get_list){
        foreach($get_list AS $row){
            $i +=1;
            $data[$i] = ['ns' => $row["nameserver"],'ip' => $row["ip_address"]];
        }
    }
    return $data;
}

Parameters;

  • $params Provides the value of [options] index in the $order variable in the class.
Array
(
    [1] => Array
        (
            [ns] => ns1.example.com
            [ip] => 192.168.1.1
        )

    [2] => Array
        (
            [ns] => ns2.example.com
            [ip] => 192.168.1.2
        )

)
ModifyDns() - NameServer Update addCNS() - Add Child Nameserver

Do you have any questions?

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

New Year's Special Discount

"Startup Lifetime" and "Professional Lifetime" licenses are 30% off!

Coupon Code:
HAPPYYEARS30 Copied!
Discount Rate 30%
Expiration Date December 31, 2024