WTF is my redirect not passing refferer info?

Status
Not open for further replies.

crossfittn

Afro Blue
Feb 4, 2007
1,135
8
0
TN
topyc.io
2108897916_f1fde06411.jpg


Why does this script not send referrer info to my affiliate? I started using this script so I could test with Google Website Optimizer, and since then all my clicks to the merchant have shown up as blank referrers in their backend...... What's wrong here?

PHP:
<?
$v = $_REQUEST['v'];
$s = $_REQUEST['s'];
if($v == '' || $s == ''){
    echo '<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0;url=http://www.affiliatesite.com/index.php?affid?12345&campaign-blankvisit"></head><body>';
}else{

    # tracking cookie
    $url .= '&campaign='.$v . $_COOKIE['gkeyword'];

    # get the base aff url
    $url = getUrl($s);
    
    $url .= '&campaign='.$ver;
     
        //print html page
    echo '<html><head><title></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0;url='.$url.'"></head><body>'; 
}


function getUrl($site_id){
    switch($site_id){
    
        case 'option1':
            $url = 'http://www.affiliatesite.com/index.php?affid?12345';
        break;

        case 'option2':
            $url = 'http://www.affiliatesite.com/other.php?affid?12345';
        break;
    
        default:
            break;
    }
    return $url;
}

?>

<!-- google website optimizer below -->

</body>
</html>
 


Meta refresh doesn't pass referrer. Why do you want it to? You could just go direct to merchant instead of using this redirect or use a PHP location redirect if you want the merchant to see your traffic source.
 
Status
Not open for further replies.