{ "code": 200, "msg": "获取成功", "主办单位名称": "深圳市腾讯计算机系统有限公司", "主办单位性质": "企业", "备案许可证号": "粤B2-20090059-5", "网站备案名称": "腾讯网", "网站首页网址": "www.qq.com", "备案审核时间": "2020\/4\/29 23:51:11" }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2020/05/01 13:26 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://api.66mz8.com/api/icp.php?domain=www.qq.com'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://api.66mz8.com/api/icp.php?domain=www.qq.com" ) func main() { queryUrl := fmt.Sprintf("%s",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)) }