| 参数名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| pic | file/string | 是 | 驾驶证图片文件 POST上传,支持传base64格式的图片内容 JPG识别率略高 |
| 参数名称 | 类型 | 说明 |
|---|---|---|
| licensenumber | string | 驾驶证号 |
| realname | string | 姓名 |
| sex | string | 性别 |
| address | string | 地址 |
| birth | string | 出生年月 |
| initialdate | string | 初始领证日期 |
| type | string | 准驾车型 |
| startdate | string | 有效起始日期 |
| enddate | string | 有效截止日期 |
<?php
require_once 'curl.func.php';
$appkey = 'your_appkey_here';//你的appkey
$url = "https://api.binstd.com/driverlicenserecognition/recognize?appkey=$appkey";
$post = array(
'pic'=>base64_encode(file_get_contents('sfz1.jpg')), //'@'.realpath('11.jpg')
);
$result = curlOpen($url, array('post'=>$post, 'isupfile'=>true));
$jsonarr = json_decode($result, true);
if($jsonarr['status'] != 0)
{
echo $jsonarr['msg'];
exit();
}
$result = $jsonarr['result'];
echo $result['licensenumber'].' '.$result['realname'].' '.$result['sex'].'
';
echo $result['address'].' '.$result['birth'].' '.$result['initialdate'].'
';
echo $result['type'].' '.$result['startdate'].' '.$result['enddate'];
{
"status": "0",
"msg": "ok",
"result": {
"licensenumber": "334567199901220124",
"realname": "李先生",
"sex": "男",
"address": "浙江省杭州市拱墅区祥园路139号智慧立方",
"birth": "1999-01-22",
"initialdate": "2014-02-25",
"type": "C1",
"startdate": "2014-02-25",
"enddate": "2020-02-25"
}
}
| 代号 | 说明 |
|---|---|
| 201 | 图片为空 |
| 202 | 图片格式错误 |
| 208 | 识别失败 |
| 210 | 没有信息 |
| 代号 | 说明 |
|---|---|
| 101 | APPKEY为空或不存在 |
| 102 | APPKEY已过期 |
| 103 | APPKEY无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP被禁止 |
| 106 | IP请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |
| 名称 | 权限 | 价格 | |
|---|---|---|---|
| 免费套餐 | 5次 | 免费 | |
| Level1 | 3000次 | 230.00元 | |
| Level2 | 5000次 | 375.00元 | |
| Level3 | 10000次 | 725.00元 |
开通账号: