| 接口地址:http://zhouxunwang.cn/data/?id=126 |
|---|
| 返回格式:json |
| 请求方式:get |
| 请求示例:http://zhouxunwang.cn/data/?id=126&key=R5RTF4G5F5H6&caipiaoid=13&issueno= |
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| key | string | 必填 | 平台的KEY 扫码关注公众号 |
| caipiaoid | string | 必填 | 彩票ID:1福彩,2体彩,11双色球,12福彩3D,13七乐彩 |
| issueno | string | 必填 | 期号,不选默认是当前期 |
| 名称 | 类型 | 说明 |
|---|---|---|
| caipiaoid | int | 彩票ID |
| issueno | string | 期号 |
| number | string | 开奖号码 |
| refernumber | string | 参考号 |
| opendate | string | 开奖日期 |
| deadline | string | 兑奖截止日期 |
| saleamount | string | 销售额 |
| prizename | string | 奖项 |
| require | string | 中奖条件 |
| num | int | 中奖人数 |
| singlebonus | string | 单注金额 |
| prize | string | 中奖情况 |
| totalmoney | string | 奖池奖金 |
{
"status": "0",
"msg": "ok",
"result": {
"caipiaoid": "13",
"issueno": "2014127",
"number": "05 07 10 18 19 21 27",
"refernumber": "28",
"opendate": "2014-10-29",
"deadline": "2014-12-27",
"saleamount": "7482530",
"prize": [{
"prizename": "二等奖",
"require": "中6+0",
"num": "50",
"singlebonus": "608921"
}, {
"prizename": "六等奖",
"require": "中2+1/1+1/0+1",
"num": "10863811",
"singlebonus": "5"
}]
}
}| 错误码 | 说明 |
|---|---|
| 00000 | 没有该接口 |
| 00001 | 参数有空 |
| 00002 | key错误 |
| 00003 | 未办理过该业务 |
| 00004 | 条数不够 |
| 00005 | 已到期 |
| 00006 | 今天条数已用光 |
| 00007 | 您的账号不存在 |
| 201 | 彩票ID为空 |
| 202 | 彩票号码为空 |
| 203 | 不支持的彩种 |
| 210 | 没有信息 |
| 101 | APPKEY为空或不存在 |
| 102 | APPKEY已过期 |
| 103 | APPKEY无请求此数据权限 |
| 104 | 请求超过次数限制 |
| 105 | IP被禁止 |
| 106 | IP请求超过限制 |
| 107 | 接口维护中 |
| 108 | 接口已停用 |
<?php
/**
* Created by PhpStorm.
* User: FZS
* Time: 2020/06/06 17:26
*/
class freeApi
{
private $apiUrl;
public function __construct()
{
$this->apiUrl = 'http://zhouxunwang.cn/data/?id=126&key=R5RTF4G5F5H6&caipiaoid=13&issueno=';
}
/**
* 获取结果
* @return array
*/
public function getResult()
{
return file_get_contents($this->apiUrl);
}
}package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
const (
APIURL = "http://zhouxunwang.cn/data/?id=126&key=R5RTF4G5F5H6&caipiaoid=13&issueno="
)
func main() {
queryUrl := fmt.Sprintf("%s",APIURL)
resp, err := http.Get(queryUrl)
if err != nil {
log.Println(err)
return
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}