首页 汽车配件OE信息查询 汽车配件OE信息查询示例代码 原厂零件号模糊搜索[PHP]

原厂零件号模糊搜索示例代码[PHP]

作者: 阅读数:570 上传时间:2025-01-18

原厂零件号模糊搜索

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/parts/search?appkey=$appkey";
$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['number2'].' '.$result['number'];
foreach($result['list'] as $key=>$val)
{
	echo $val['0'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['remark'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['1'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['2'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['3'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['4'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['5'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['6'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['7'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'].' '.$val['8'].' '.$val['stdname'].' '.$val['brand'].' '.$val['number2'].' '.$val['hascar'].' '.$val['name'].' '.$val['isreplace'].' '.$val['marketprice'].' '.$val['marketpricedb'].' '.$val['marketpricehd'].' '.$val['marketpricehb'].' '.$val['marketpricexb'].' '.$val['marketpricehn'].' '.$val['number'].' '.$val['brandid'].' '.$val['partsid'];
}