https://github.com/usualtool/ut-api
Unified API extension of UT framework.
https://github.com/usualtool/ut-api
calendar deqrcode imgbin ipaddress nsfw ocr openapi telephone utsw voice whois
Last synced: 5 months ago
JSON representation
Unified API extension of UT framework.
- Host: GitHub
- URL: https://github.com/usualtool/ut-api
- Owner: usualtool
- License: apache-2.0
- Created: 2022-04-24T07:17:14.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-25T04:36:55.000Z (5 months ago)
- Last Synced: 2026-01-25T18:58:52.403Z (5 months ago)
- Topics: calendar, deqrcode, imgbin, ipaddress, nsfw, ocr, openapi, telephone, utsw, voice, whois
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.me
- License: LICENSE
Awesome Lists containing this project
README
Run("nsfw","text=");
/**
* 图片文字识别
* 参数:image
* 说明:url地址/base64字符串。该参数传入时可为URL地址,也可以使用urlencode编码后的base64编码
* 返回图片上文字的数组
*/
//echo $api->Run("ocr","image=http://frame.usualtool.com/assets/logo.png");
/**
* 文字转语音
* 参数:sex
* 说明:性别。0为女生,1为男生
* 参数:text
* 说明:转译文本,限4800字内
* 生成一个临时MP3文件,请及时储存
*/
//echo $api->Run("voice","sex=0&text=您好");
/**
* 电话号码归属地
* 参数:phone
* 说明:固定号码或手机号码
* 返回地址、区号、运营商、邮编
*/
//echo $api->Run("telephone","phone=13800000000");
/**
* 域名Whois
* 参数:domain
* 说明:域名
* 返回Whois信息
*/
//echo $api->Run("whois","domain=baidu.com");
/**
* 图片二值化
* 参数:image
* 说明:base64图片编码,base64编码需进行urlencode编码传递
* 返回二值化的base64图片编码
*/
//echo $api->Run("imgbin","image=".urlencode(library\UsualToolInc\UTInc::ImgToBase64("http://frame.usualtool.com/assets/logo.png")));
/**
* 域名/IP地址归属
* 参数:domain
* 说明:域名/IP
* 返回固定两组对比数据,物理位置、运营商、经纬度(粗略定位),择优选用
*/
//echo $api->Run("ipaddress","domain=aliyun.com");
//......不一一例举,参看官方手册