首页 配件OE信息查询 配件OE信息查询示例代码 配件品牌[PHP]

配件品牌示例代码[PHP]

作者: 阅读数:1645 上传时间:2021-06-17

配件品牌

<?php

require_once 'curl.func.php';

$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.jisuapi.com/parts/brand?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'];
;
foreach($result['0'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['1'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['2'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['3'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['4'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['5'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['6'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['7'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['8'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['9'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['10'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['11'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}
foreach($result['12'] as $key=>$val)
{
	echo $val['brandid'].' '.$val['name'].' '.$val['initial'];
}