{ "code": "200", "主办单位名称": "深圳市腾讯计算机系统有限公司", "主办单位性质": "企业", "网站备案/许可证号": "粤B2-20090059-5", "网站名称": "腾讯网", "网站首页网址": "www.qq.com", "审核时间": "2021-09-26" }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2021/10/01 01:08 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://api.oick.cn/icp/api.php?url=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.oick.cn/icp/api.php?url=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)) }