arsonik / secret-redirect
hidding ad redirection
Installs: 9 086
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 1
Open Issues: 1
Requires (Dev)
- phpunit/phpunit: ^6.3
This package is not auto-updated.
Last update: 2024-11-10 05:14:14 UTC
README
A discrete way of forwarding client request.
Installation
composer require arsonik/secret-redirect
require './vendor/autoload.php';
Usage
Forward client with the Location header (302 status)
$secret = new SecretRedirect(); $secret->cookiePrefix = 'm2sa_'; $secret->redirect('http://ads-server.tld/campaign?id=xxxx', 'http://fallback.tld/azz'); exit;
Returns Location header url
$secret = new SecretRedirect(); $secret->cookiePrefix = 'm2sa_'; $url = $secret->location('http://ads-server.tld/campaign?id=xxxx', 'http://fallback.tld/azz');
Returns destination page content
$secret = new SecretRedirect(); $secret->cookiePrefix = 'm2sa_'; $content = $secret->content('http://ads-server.tld/campaign?id=xxxx');
Optional configuration
SecretRedirect
class parameters
cookiePrefix
StringforwardCookies
BooleanserverUsesXHttpForwardedFor
Booleantimeout
Float