arsonik / secret-redirect
hidding ad redirection
Installs: 9 252
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-12-22 05:50:11 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