域名相關 - API文檔

域名查詢

31选7今天开奖结果 www.qnzge.com /Domain/Check

API分類 域名相關 請求方法 GET

API簡介

查詢一個域名是否可以注冊。

請求參數

名稱 必須 說明
ApiKey API請求時必須提供的密鑰,請和管理員聯系索取
Password 登錄朝暮數據用戶管理的密碼
Domain 相關域名,如abc.com

注:參數名稱不區分大小寫。

請求示例

BASE_URL/Domain/Check?ApiKey=testApi&Password=testPassword&Domain=zhaomu123.com

輸出結果

{
    domain: "zhaomu123.com"
    available: true
}

代碼示例

using RestSharp; //使用第三方組件RestSharp

var client = new RestClient();
client.BaseUrl = new Uri("//BASE_URL");

var request = new RestRequest("/Domain/Check",Method.GET);
request.AddParameter("ApiKey", "testApi");
request.AddParameter("Password", "testPassword");
request.AddParameter("Domain", "zhaomu123.com");

var response = client.Execute(request);
string result = response.Content;
$url = '//BASE_URL/Domain/Check';
$param = array(
  'ApiKey' => 'testApi',
  'Password' => 'testPassword',
  'Domain' => 'zhaomu123.com'    
);
$data = http_build_query($param);

$options = array(
            'http' => array(
                'method' => 'GET',
                'header' => 'Content-Type: application/x-www-form-urlencoded',
                'content' => $data
        ));
$context = stream_context_create($options);
$result = file_get_contents($url, FILE_TEXT, $context);
?>
'API請求的URL地址
const url = "//BASE_URL/Domain/Check?ApiKey=testApi&Password=testPassword&Domain=zhaomu123.com"

'執行HTTP請求
Set http = Server.CreateObject("MSXML2.ServerXMLHTTP")
http.Open "GET", url, False
http.Send

'獲取并分析結果
result = http.responseText