arsonik/secret-redirect

hidding ad redirection

Installs: 10 194

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 1

pkg:composer/arsonik/secret-redirect

v2.1.2 2018-01-23 15:59 UTC

This package is not auto-updated.

Last update: 2025-09-28 09:45:34 UTC


README

Latest Stable Version

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 String
  • forwardCookies Boolean
  • serverUsesXHttpForwardedFor Boolean
  • timeout Float