jdreesen/camo-url-generator
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jdreesen/camo-url-generator
包简介
A library that generates URLs for usage with camo TLS image proxy.
关键字:
README 文档
README
A PHP library that generates camouflaged URLs for usage with camo or go-camo TLS image proxy.
Installation
Just run
$ composer require jdreesen/camo-url-generator
Example
use Dreesen\Image\HexCamo; use Dreesen\Image\HttpOnlyCamo; $camo = new HttpOnlyCamo(new HexCamo('https://img.example.org', 'secret')); echo $camo->camouflage('http://example.org/image.jpg');
The secret is the same HMAC key you used on your camo server instance running on https://img.example.org.
What's inside?
Dreesen\Image\Camo: Interface for your type-hinting which is implemented by all the following classes.Dreesen\Image\HexCamo: Generates URLs for usage with the camo or go-camo image proxy in HEX format.Dreesen\Image\Base64Camo: Generates URLs for usage with the go-camo image proxy in Base64 format.Dreesen\Image\QueryStringCamo: Generates URLs for usage with the camo image proxy in query string format.Dreesen\Image\HttpOnlyCamo: Decorator to only camouflage HTTP (non-secure) URLs.Dreesen\Image\NoCamo: Disables image camouflage by returning given URLs as they are.
Credit
Thanks to Corey Donohoe for creating Camo and to cactus for the GoLang port of Camo.
License
All contents of this package are licensed under the MIT license.
统计信息
- 总下载量: 25
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-20