{ "LastUpdate": "2023-07-11 00:50:01", "Total": 440, "Language": "zh-CN", "message": "ok", "status": true, "success": true, "info": "https://raw.onmicrosoft.cn/Bing-Wallpaper-Action/main/data/info.json", "data": [{ "startdate": "20230710", "fullstartdate": "202307101600", "enddate": "20230711", "url": "/th?id=OHR.WorldPopDay_ZH-CN7074706912_1920x1080.jpg&rf=LaDigue_1920x1080.jpg&pid=hp", "urlbase": "/th?id=OHR.WorldPopDay_ZH-CN7074706912", "copyright": "Hong Kong SAR (© leungchopan/Getty Images)", "copyrightlink": "https://www.bing.com/search?q=%E9%A6%99%E6%B8%AF%E7%89%B9%E5%88%AB%E8%A1%8C%E6%94%BF%E5%8C%BA&form=hpcapt&mkt=zh-cn", "title": "万家灯火", "quiz": "/search?q=Bing+homepage+quiz&filters=WQOskey:%22HPQuiz_20230710_WorldPopDay%22&FORM=HPQUIZ", "wp": true, "hsh": "7d5962d2f7d167bd88d3b2291734b799", "drk": 1, "top": 1, "bot": 1, "hs": [] }] }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2023/06/05 14:26 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://raw.onmicrosoft.cn/Bing-Wallpaper-Action/main/data/zh-CN_all.json'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://raw.onmicrosoft.cn/Bing-Wallpaper-Action/main/data/zh-CN_all.json" ) 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)) }