{ "code": 1, "msg": "数据返回成功!", "data": [{ "imageUrl": "https://tvax3.sinaimg.cn/large/005BYqpgly1g1ut58lurhj31c00u0jv5.jpg", "imageSize": "1728x1080", "imageFileLength": 141759 }, { "imageUrl": "https://tvax3.sinaimg.cn/large/005BYqpggy1g28en9sjk3j31c00u0hai.jpg", "imageSize": "1728x1080", "imageFileLength": 158794 }, { "imageUrl": "https://tvax3.sinaimg.cn/large/005UYuA2gy1fvzhwrgq86j31hc0xctgc.jpg", "imageSize": "1920x1200", "imageFileLength": 280226 }, { "imageUrl": "https://tvax3.sinaimg.cn/large/005BYqpggy1g28en64bi8j31hc0u0dot.jpg", "imageSize": "1920x1080", "imageFileLength": 302986 }, { "imageUrl": "https://tvax3.sinaimg.cn/large/005BYqpggy1g1urvuo4e0j31c00u07j7.jpg", "imageSize": "1728x1080", "imageFileLength": 215270 }, { "imageUrl": "https://tvax2.sinaimg.cn/large/005BYqpgly1g1urbb68fyj31hc0u0khf.jpg", "imageSize": "1920x1080", "imageFileLength": 618096 }, { "imageUrl": "https://tvax3.sinaimg.cn/large/005BYqpggy1g28evp7c8mj31c00u0qar.jpg", "imageSize": "1728x1080", "imageFileLength": 178117 }, { "imageUrl": "https://tvax3.sinaimg.cn/large/005BYqpggy1g28dbqm8c1j31hc0u0ae5.jpg", "imageSize": "1920x1080", "imageFileLength": 144694 }, { "imageUrl": "https://tvax1.sinaimg.cn/large/005BYqpgly1g1us8z7l5ej31hc0u044j.jpg", "imageSize": "1920x1080", "imageFileLength": 235538 }, { "imageUrl": "https://tvax3.sinaimg.cn/large/005BYqpgly1g1urphzevej31hc0u0dpo.jpg", "imageSize": "1920x1080", "imageFileLength": 319985 }] }
<?php /** * Created by PhpStorm. * User: FZS * Time: 2022/10/08 08:56 */ class freeApi { private $apiUrl; public function __construct() { $this->apiUrl = 'https://www.mxnzp.com/api/image/girl/list/random?app_id=your&app_secret=your'; } /** * 获取结果 * @return array */ public function getResult() { return file_get_contents($this->apiUrl); } }
package main import ( "fmt" "io/ioutil" "log" "net/http" ) const ( APIURL = "https://www.mxnzp.com/api/image/girl/list/random?app_id=your&app_secret=your" ) 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)) }