{ "code": 200, "msg": "success", "data": { "is_reg": true, "domain": "hhsy.cc", "suffix": "com", "whois_server": "grs-whois.hichina.com", "creation_date": "2001-04-12T01:43:24Z", "expiration_date": "2022-04-12T01:43:24Z", "registrar": "Alibaba Cloud Computing (Beijing) Co., Ltd.", "registrant_email": "DomainAbuse@service.aliyun.com", "registrant_phone": "+86.95187", "nomain_status": [ "正常(ok)" ], "name_server": [ "DNS25.HICHINA.COM", "DNS26.HICHINA.COM" ], "dnssec": "unsigned" }, "Author": { "name": "Alone88", "desc": "由Alone88提供的免费API 服务,官方文档:www.alapi.cn" } }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2020/02/01 00:16 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://v1.alapi.cn/api/new/wbtop?domain=hhsy.cc'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://v1.alapi.cn/api/whois" ) func main() { queryUrl := fmt.Sprintf("%s?domain=hhsy.cc",APIURL) resp, err := http.Get(queryUrl) if err != nil { log.Println(err) return } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { fmt.Println(err) return } fmt.Println(string(body)) }