log1x / captured
适用于CapturedApp的Captured PHP脚本的加固重写
v1.0.0
2019-03-26 05:03 UTC
Requires
- hashids/hashids: ^3.0
- nesbot/carbon: ^2.13
- samayo/bulletproof: ^4.0
This package is auto-updated.
Last update: 2024-08-26 16:43:28 UTC
README
这是对原始 Captured PHP脚本的重写,用于与Captured一起使用。
特性
- 使用PSR-2进行清洁、现代化的重写。
- 外部配置。
- 使用Bulletproof安全(并且正确)地处理图像上传。
- 可自定义的截图文件名,可以使用slug和时间戳(例如
Screenshot_2019-03-02_13-12-57.png
)或使用Hashids库生成随机字符串。
安装
$ composer create-project log1x/captured:dev-master
使用方法
- 在
config.php
中设置配置。 - 将
captured
文件夹的内容上传到您的服务器。 - 使用您的URL和令牌配置Captured App。
测试
为了测试目的,您可以使用curl
curl -i -X POST \ -F "token=YOUR_TOKEN" \ -F "file=@path/to/test.jpg" \ https://example.com/screenshots/