arsonik / secret-redirect
隐藏广告重定向
v2.1.2
2018-01-23 15:59 UTC
Requires (Dev)
- phpunit/phpunit: ^6.3
This package is not auto-updated.
Last update: 2024-09-15 04:20:53 UTC
README
一种客户端请求的隐蔽转发方式。
安装
composer require arsonik/secret-redirect
require './vendor/autoload.php';
使用
使用Location头(302状态)转发客户端
$secret = new SecretRedirect(); $secret->cookiePrefix = 'm2sa_'; $secret->redirect('http://ads-server.tld/campaign?id=xxxx', 'http://fallback.tld/azz'); exit;
返回Location头URL
$secret = new SecretRedirect(); $secret->cookiePrefix = 'm2sa_'; $url = $secret->location('http://ads-server.tld/campaign?id=xxxx', 'http://fallback.tld/azz');
返回目标页面内容
$secret = new SecretRedirect(); $secret->cookiePrefix = 'm2sa_'; $content = $secret->content('http://ads-server.tld/campaign?id=xxxx');
可选配置
SecretRedirect
类参数
cookiePrefix
字符串forwardCookies
布尔值serverUsesXHttpForwardedFor
布尔值timeout
浮点数