接口介绍 | 为彩票行业提供(全国彩票开奖数据API接口)。及时、稳定、并二次校验的彩票开奖API数据接口,通途:自己制作走势图与统计分析使用。 |
协议编码 | 协议:https,编码:UTF-8 |
数据字段 | 期号、奖号、中奖情况。 |
请求限制 |
|
参数名 | 介绍 | 方式 | 选填 | 参数值 | 自助操作 |
---|---|---|---|---|---|
type | 彩种名称 | GET | 选填 | 默认:ssq(ssq、sd、p3、p5、dlt、qxc、qlc) | |
name | 用户名 | GET | 必填 | ***** | 登录获取 |
token | 通信令牌 | GET | 必填 | ***** | 登录获取 |
format | 输出格式 | GET | 选填 | json | |
num | 条数设置 | GET | 选填 | 1(默认:1条) |
接口调用地址:https://www.zbjr.net/api/open/?type=ssq&name=*****&token=*****
$api = "https://www.zbjr.net/api/open/?type=ssq&name=*****&token=*****";
$ch = curl_init(); curl_setopt($ch,CURLOPT_URL,$api); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch,CURLOPT_NOBODY,0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_TIMEOUT,10); $data = curl_exec($ch); $data = json_decode($data,true); var_dump($data['data']); //打印数据类型 curl_close($ch); |