{ "code": 200, "msg": "success", "data": { "status": "获取成功", "url": "https://vip.d0.baidupan.com/file/?AmRUagw9VWRRWFZuCj9SPlplVW0ELgRyAWBQe1QwUHYBIVYmC79SrQPNAr0KzVbWV+kEvwT7UbUHlFLtUCFStAKuVK8MaFXlUbxWowpwUiFaYVUiBH0EYAFvUDpUbVAOAWhWZQtrUjcDZAJkCmhWZ1c8BDIEaFF1B2ZSJ1AxUmECMVQ0DGRVNVE2VjQKbVJ1WnBVIARmBDQBNlBnVDFQfgExVjkLeVI3A2YCewo7VjZXaQRlBGxRYgdiUmJQaVJhAmNUMQxoVWdRMlYwCjpSY1oxVWIEbAQwATNQZ1QxUGgBY1ZkC2dSNQM0AmYKcFYlV2wEcwR9USYHc1IxUH5SOgJmVD4MZlUwUTdWNwpvUmRaJlUkBDIEawFjUDBUNVBgATRWNwtvUjMDYgJgCmpWZVc1BC8EdVF1B2ZSOFB7Um4CM1Q2DGdVOFEzVjAKblJqWjJVYQR9BHMBdlAhVDVQYAE0VjcLY1IwA20CZgpvVm9XOg==" }, "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/lanzou?url=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/lanzou" ) func main() { queryUrl := fmt.Sprintf("%s?url=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)) }