Developer Center

EN

questioning() - Domain Name Check

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
                )

        )


)
setConfig() register() - Domain Name Registration

Do you have any questions?

We have a great team to answer your queries
Contact Us
Copyright © 2020. All rights reserved.
Join Our Discord Channel
Top