| 接口地址:https://v2.xxapi.cn/api/chineseCaptcha |
|---|
| 返回格式:json |
| 请求方式:get/post |
| 请求示例:https://v2.xxapi.cn/api/chineseCaptcha |
| 名称 | 类型 | 必填 | 说明 |
|---|---|---|---|
| type | string | 选填 | 传入verify为校验验证码 |
| id | string | 选填 | 传递验证码生成的ID |
| answer | string | 选填 | 传入验证码运算结果 |
| 名称 | 类型 | 说明 |
|---|---|---|
| url | string | 图片base64 |
{
"code": 200,
"msg": "数据请求成功",
"data": {
"id": "9LwralEuTpDubiYtG2zGL5MD",
"url": "data:image/pg=="
},
"request_id": "2a0178e7c41d14442f3bcd67"
}| 错误码 | 说明 |
|---|---|
| - | - |
<?php
/**
* Created by PhpStorm.
* User: FZS
* Time: 2025/4/20 07:11
*/
class freeApi
{
private $apiUrl;
public function __construct()
{
$this->apiUrl = 'https://v2.xxapi.cn/api/chineseCaptcha';
}
/**
* 获取结果
* @return array
*/
public function getResult()
{
return file_get_contents($this->apiUrl);
}
}package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
const (
APIURL = "https://v2.xxapi.cn/api/chineseCaptcha"
)
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))
}