Path: API › 网站管理

`POST /site`

获取指定网站当前使用的 PHP 版本及其他运行环境信息。

## Request body

_Required._

- `action256.request_time` (string, required) — Unix 时间戳。
- `action256.request_token` (string, required) — 按 API 概览生成的签名。
- `action256.action` (string, required) — 具体操作名称。
  - one of `"GetSitePHPVersion"`
- `action256.siteName` (string, required) — 网站域名，如 `testapi.bt.local`

## Example request

```text
{
  "request_time": "string",
  "request_token": "string",
  "action": "GetSitePHPVersion",
  "siteName": "string"
}
```

## Code samples

### cURL（填写面板地址与签名）

```curl
curl --request POST \
  --url "https://your-panel.example.com:8888/site" \
  --header "Content-Type: application/x-www-form-urlencoded" \
  --data-urlencode "request_time=<Unix时间戳>" \
  --data-urlencode "request_token=<按 API 概览生成的签名>" \
  --data-urlencode "action=GetSitePHPVersion" \
  --data-urlencode "siteName=<siteName>"
```

## Responses

### default

接口响应，业务状态见下方详细说明。

#### Example

```json
{
  "phpversion": "85",
  "tomcat": -1,
  "tomcatversion": false,
  "nodejsversion": false,
  "php_other": ""
}
```

- `action256.response.default.phpversion` (string, optional) — PHP 版本号，如 `85`、`00`（纯静态）
- `action256.response.default.tomcat` (integer, optional) — Tomcat 状态，`-1` 表示未启用
- `action256.response.default.tomcatversion` (string, optional) — Tomcat 版本
- `action256.response.default.nodejsversion` (string, optional) — Node.js 版本
- `action256.response.default.php_other` (string, optional) — 其他 PHP 配置


## GetSitePHPVersion

获取指定网站当前使用的 PHP 版本及其他运行环境信息。

- **路由**：`POST /site`
- **action**：`GetSitePHPVersion`

## 输入参数

| 参数名称 | 必选 | 类型 | 描述 |
|----------|------|------|------|
| action | 是 | String | 固定值 `GetSitePHPVersion` |
| siteName | 是 | String | 网站域名，如 `testapi.bt.local` |

## 输出参数

| 参数名称 | 类型 | 描述 |
|----------|------|------|
| phpversion | String | PHP 版本号，如 `85`、`00`（纯静态） |
| tomcat | Integer | Tomcat 状态，`-1` 表示未启用 |
| tomcatversion | Boolean/String | Tomcat 版本 |
| nodejsversion | Boolean/String | Node.js 版本 |
| php_other | String | 其他 PHP 配置 |

## 示例

### 请求

```
POST /site HTTP/1.1
Host: 192.168.168.213:8888
Content-Type: application/x-www-form-urlencoded

request_time=1700000000&request_token=xxx&action=GetSitePHPVersion&siteName=testapi.bt.local
```

### 响应

```json
{
    "phpversion": "85",
    "tomcat": -1,
    "tomcatversion": false,
    "nodejsversion": false,
    "php_other": ""
}
```

