User Guide and Documentation

questioning() - Domain Name CheckRelease Date: 2019/07/29

It is used to query the domain name. If API supports, you can run the API method within the function. If API does not support domain name query, it checks the status of the domain name through available whois servers defined in the systems.

public function questioning($sld=NULL,$tlds=[]){
    if($sld == '' || empty($tlds)){
        $this->error = $this->lang["error2"];
        return false;
    }
    $sld = idn_to_ascii($sld,0,INTL_IDNA_VARIANT_UTS46);
    if(!is_array($tlds)) $tlds = [$tlds];

    $servers            = Registrar::whois_server($tlds);

    $result = [];
    foreach ($tlds AS $t){
        if(isset($servers[$t]["host"]) && isset($servers[$t]["available_pattern"]))
            $questioning = Registrar::questioning($sld,$t,$servers[$t]["host"],43,$servers[$t]["available_pattern"]);
        else
            $questioning = false;

        $result[$t] = ['status' => $questioning['status']];

    }
    return $result;
}

Parameters;

  • $sld domain name to be queried (it appears without extension)
  • $tlds the extension without a period before the domain name to be queried (may be an array or string)

Retrieval Value;

Array
(
    [com] => Array
        (
            [status] => available | unavailable | unknown
            [premium] => boolean(true | false)
            [premium_price] => Array
                (
                    [amount] => 0
                    [currency] => USD
                )

        )

    [net] => Array
        (
            [status] => available | unavailable | unknown
            [premium] => boolean(true | false)
            [premium_price] => Array
                (
                    [amount] => 0
                    [currency] => USD
                )

        )


)
Copyright © 2019. All rights reserved.
Top