php redirect , cloaking affiliate links

Let us talk about scripts, HTML, Perl, PHP, apache, etc.
User avatar
Stevyn
SysOp
Posts:1786
Joined:Mon Nov 09, 2009 10:03 am
Location:Japan
Contact:
php redirect , cloaking affiliate links

Post by Stevyn » Wed Jun 26, 2019 2:16 pm

https://vpsfix.com/6191/cloak-affiliate-links-php-file/

Code: Select all

<?php
$v = $_GET['v'];
// In case someone calls naked php file
if ($v == '') {$link = 'http://example.com/';}

// Add as many as links in below format. Each in a new line.
if ($v == 'product1') {$link = 'http://example1.com/';}
if ($v == 'product2') {$link = 'http://example2.com/';}
if ($v == 'product3') {$link = 'http://example3.com/';}

// Don't change anything below this line.
header("Location: $link") ;
exit();
?>
Contact me directly: Ironfeatherbooks (@) gmail.com

Image

Post Reply