<?php require_once 'curl.func.php'; $date = date('Y-m-d', strtotime("-1 days")); $appkey = 'your_appkey_here';//你的appkey $url = "https://api.jisuapi.com/gold/storegold?appkey=$appkey&date=".$date; $result = curlOpen($url, ['ssl'=>true]); $jsonarr = json_decode($result, true); //exit(var_dump($jsonarr)); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $list = $jsonarr['result']['list']; foreach($list as $val) { echo $val['store_name'].' 金价为:'.$val['gold'].'<br>'; }