[<img src="https://zuigao.com/static/assets/logo.png" width="200" /> ](https://zuigao.com)
*****
__商標查詢API `2.0.0` 版本__
> 我們還開發了商標管理系統 `__ + __` 一鍵提交商標軟件
> 開通API申請,可以加微信:18588899992
> 
> 官方網站:https://zuigao.com
__使用本API的小程序__
|  |  |
| :---: | :---: |
| 商標選類 | 超龍商標 |
| 功能 | 免費試用 | 基礎版 | 精英版 | 旗艦版 |
| :------: | :------: | :------: | :------: | :------: |
| 獲取商標大類 | 無 | 不限 | 不限 | 不限 |
| 獲取商標分類 | 無 | 不限 | 不限 | 不限 |
| 精確查詢 | 10次/天 | 1000次/天 | 2000次/天 | 6000次/天 |
| 近似查詢 | 10次/天 | 1000次/天 | 2000次/天 | 6000次/天 |
| 拼音查詢 | 10次/天 | 1000次/天 | 2000次/天 | 6000次/天 |
| 申請號查詢 | 10次/天 | 1000次/天 | 2000次/天 | 6000次/天 |
| 申請人查詢 | 10次/天 | 1000次/天 | 2000次/天 | 6000次/天 |
| 商標詳情查詢 | 10次/天 | 20000次/天 | 40000次/天 | 120000次/天 |
| 推廣價格 | 免費試用 | ¥699/年 | ¥1299/年 | ¥3299/年 |
>以下是官方提供的基本操作文件,各位可以根據自己的習慣優化下面的代碼
__示例所引用的Aes.php 加密解密代碼__
```
<?php
namespace Aes;
class Aes
{
/**
* 商標查詢api專用的加密
*/
public function encode($str, $key = '', $iv = '', $method = 'AES-128-CBC', $option = OPENSSL_RAW_DATA)
{
$code_str = openssl_encrypt($str, $method, $key, $option, $iv);
return base64_encode($code_str);
}
/**
* 商標查詢api專用的解密
*/
public function decode($str, $key = '', $iv = '', $method = 'AES-128-CBC', $option = OPENSSL_RAW_DATA)
{
$code_str = openssl_decrypt(base64_decode($str), $method, $key, $option, $iv);
return $code_str;
}
}
?>
```
__示例所引用的common.php 公共函數代碼__
```
<?php
require_once 'Aes.php';
/**
* CURL 操作
* @param $url
* @param int $post =1為post,=0為get
* @param array $param
*/
function curl($url, $post = 0, $param = [])
{
$c = curl_init();
curl_setopt($c, CURLOPT_URL, $url);
if ($post) {
curl_setopt($c, CURLOPT_POST, 1);
}
curl_setopt($c, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
if ($param) {
curl_setopt($c, CURLOPT_POSTFIELDS, $param);
}
curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($c, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($c, CURLOPT_TIMEOUT, 300); // 5分鐘超時
$ex = curl_exec($c);
if ($ex === false) {
return json_encode(['error' => curl_error($c)]);
}
curl_close($c);
return $ex;
}
?>
```