<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here';//你的appkey $classid = '65'; $vin = ''; $brandid = ''; $carid = '21617'; $url = "https://api.jisuapi.com/maintenance/product?appkey=$appkey&classid=$classid&vin=$vin&brandid=$brandid&carid=$carid"; $result = curlOpen($url, ['ssl'=>true]); $jsonarr = json_decode($result, true); //exit(var_dump($jsonarr)); if($jsonarr['status'] != 0) { echo $jsonarr['msg']; exit(); } $result = $jsonarr['result']; echo $result['vin'].' '.$result['brandid'].' '.$result['classid']; foreach($result['partslist'] as $key=>$val) { echo $val['partsid'].' '.$val['name'].' '.$val['number'].' '.$val['price'].' '.$val['remark'].' '.$val['marketprice']; } foreach($result['list'] as $key=>$val) { echo $val['name'].' '.$val['number'].' '.$val['brand'].' '.$val['price'].' '.$val['classid'].' '.$val['brandid']; }