耐撅、耐撅、还是耐撅的 ASS 接口服务
共收录了
61 个姿势 · 今日被掘 5170507 次
汉字转拼音(支持多音字)
接口地址: https://api.vore.top/api/PinYin
返回格式: JSON
请求方式: GET
请求示例: https://api.vore.top/api/PinYin?text=API.VORE.TOP-汉字转拼音!
请求参数说明:
返回参数说明:
返回示例:
{
"code": 200,
"msg": "SUCCESS",
"data": {
"sentence": "API.VORE.TOP-汉字转拼音!",
"result": {
"zheng_ju": [
"API.VORE.TOP-hanzizhuanpinyin!"
],
"chai_fen": [
[
"A",
"P",
"I",
".",
"V",
"O",
"R",
"E",
".",
"T",
"O",
"P",
"-",
"han",
"zi",
"zhuan",
"pin",
"yin",
"!"
]
]
}
},
"time": 1641478309
}
请求详情设置:
请求参数设置:
| 参数名 | 参数值 | 操作 |
|---|---|---|
返回结果:
null
返回码表:
| 名称 | 类型 | 说明 |
|---|---|---|
| code | int | 200-请求正常 | 500-请求错误 |
| msg | string | SUCCESS-请求正常 | ERROR-请求错误 |
| data -> info/tips | string | 描述当前请求信息(如果存在) |
代码示例:
<?php
//要转换的文字(上限500字,超长请分段)
$sentence = "API.VORE.TOP-汉字转拼音!";
//拼接url
$url = "https://api.vore.top/api/PinYin?text=".$rubbish_name;
//请求数据并解码
$result = json_decode(file_get_contents($url),true);
//输出返回信息
print_r($result);
?>
当前文档浏览次数:
![]()