<?php require_once 'curl.func.php'; $appkey = 'your_appkey_here';//你的appkey $carid = '66606'; $vin = ''; $number = ''; $url = "https://api.jisuapi.com/parts2/query?appkey=$appkey&carid=$carid&vin=$vin&number=$number"; $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['name'].' '.$result['number'].' '.$result['vin']; foreach($result['list'] as $key=>$val) { echo $val['0'].' '.$val['partsid'].' '.$val['number'].' '.$val['name'].' '.$val['enname'].' '.$val['stdname'].' '.$val['brandid'].' '.$val['groupcode'].' '.$val['pic'].' '.$val['weight'].' '.$val['unit'].' '.$val['price'].' '.$val['marketprice'].' '.$val['startdate'].' '.$val['enddate'].' '.$val['1'].' '.$val['partsid'].' '.$val['number'].' '.$val['name'].' '.$val['enname'].' '.$val['stdname'].' '.$val['brandid'].' '.$val['groupcode'].' '.$val['pic'].' '.$val['weight'].' '.$val['unit'].' '.$val['price'].' '.$val['marketprice'].' '.$val['startdate'].' '.$val['enddate'].' '.$val['2'].' '.$val['partsid'].' '.$val['number'].' '.$val['name'].' '.$val['enname'].' '.$val['stdname'].' '.$val['brandid'].' '.$val['groupcode'].' '.$val['pic'].' '.$val['weight'].' '.$val['unit'].' '.$val['price'].' '.$val['marketprice'].' '.$val['startdate'].' '.$val['enddate'].' '.$val['3'].' '.$val['partsid'].' '.$val['number'].' '.$val['name'].' '.$val['enname'].' '.$val['stdname'].' '.$val['brandid'].' '.$val['groupcode'].' '.$val['pic'].' '.$val['weight'].' '.$val['unit'].' '.$val['price'].' '.$val['marketprice'].' '.$val['startdate'].' '.$val['enddate'].' '.$val['4'].' '.$val['partsid'].' '.$val['number'].' '.$val['name'].' '.$val['enname'].' '.$val['stdname'].' '.$val['brandid'].' '.$val['groupcode'].' '.$val['pic'].' '.$val['weight'].' '.$val['unit'].' '.$val['price'].' '.$val['marketprice'].' '.$val['startdate'].' '.$val['enddate']; }