参数名称 | 参数类型 | 是否必填 | 默认值 | 示例值 | 备注 |
---|---|---|---|---|---|
img_url | string | true | 图片的公网url地址:https://www.showapi.com/auth/checkCode?t=1618470356485或者是base64编码:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAALQAAAAyCAIAAAB6RmagAAAACXBIWXMAAA7EA== |
<?php header('content-type:text/html;charset=utf-8'); $ch = curl_init(); $url = 'https://api.liangmlk.cn?ak=xxxx&appid=1653'; curl_setopt($ch,CURLOPT_URL,$url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); $res = curl_exec($ch); curl_close($ch); return json_decode($res,true);