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
)
)