arsonik/secret-redirect

hidding ad redirection

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

This package is not auto-updated.

Last update: 2024-12-22 05:50:11 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