域名IPV6检测
最后更新于:2022-04-02 08:18:47
## 域名IPV6检测
>[danger]### 会员接口,仅限会员使用,购买[API会员](https://market.topthink.com/product/210)

> 可检查域名是否支持ipv6网络,并返回ipv6地址。
## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086))
### 请求地址
```
GET https://api.topthink.com/website/ipv6
```
### 请求参数
| 名称 | 类型 | 必填 | 说明 |
| --- | --- | --- | --- |
| appCode| string| 是|用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) |
| domain| string | 是 | 域名|
### 返回`data`参数
| 名称 | 类型 | 示例值 | 说明 |
| --- | --- | --- | --- |
| domain | string | ipv6.pdsu.edu.cn | 被检测的域名 |
| isipv6 | int | 1 | 0不支持,1支持 |
| ipv6 | string | 2001:250:4814:1::59 | ipv6地址,可能会为空 |
## SDK调用
```
$client = new Client("YourAppCode");
$result = $client->websiteIpv6()
->withDomain('ipv6.pdsu.edu.cn')
->request();
```
返回示例:
~~~
{
"code":0,
"message": "成功",
"data": [
{
"domain":"ipv6.pdsu.edu.cn",
"isipv6":1,
"ipv6":"2001:250:4814:1::59"
}
]
}
~~~
';