参数名称 | 参数类型 | 必填 | 默认值 | 示例值 | 备注 |
---|---|---|---|---|---|
url | string | False | http://mp.weixin.qq.com/s?__biz=MzIwNDUyOTMwMg==&mid=2247586468&idx=1&sn=3906ef99c1661c0551e25b86cb54efe2&chksm=973d195da04a904b18809a613d1622a2c8b4f71afe67e767d4f09faafc6d37b210fa75b0f0f2#rd | 文章长链接 丨文章短链接 (如果调用不成功请尝试UrlEncode编码后再调用) | |
biz | string | False | biz调用参数名biz |
<?php header('content-type:text/html;charset=utf-8'); $ch = curl_init(); $url = 'https://api.liangmlk.cn?ak=xxxx&appid=2251'; 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);