[insert_php]
$redirect = (!empty($_GET[‘url’])) ? $_GET[‘url’] : “/”;

if(isset($_GET[‘code’]))
{
//SET MARKETING CODE
setcookie(‘marketing_code’, $_GET[‘code’], time() + (86400 * 45), “/”, ‘.nethosting.com’);

if(isset($_GET[‘coupon_code’])){
setcookie(‘coupon_code’, $_GET[‘coupon_code’], time() + (86400 * 45), “/”, ‘.nethosting.com’);
}

if(isset($_GET[‘affiliateId’])){
setcookie($_GET[‘affiliateId’], 1, time() + (86400 * 45), “/”, ‘.nethosting.com’);
}

if(isset($_GET[‘gclid’])){
$redirect .= “?gclid=”.$_GET[‘gclid’];
}

header(“location: $redirect”);

} else {
echo “Your missing a required parameter”;
}
[/insert_php]