I need PHP code to change referrer and hide source of traffic to my affiliate links

Discussion in 'PHP' started by DrJale, Oct 19, 2009.

  1. #1
    Hi,

    I have been trying to find the answer on the forum, but I was unable to, so here is what I need.

    I want to hide my sources of traffic from affiliate networks. I use one php redirect script on my website: <?php header("Location: www.affiliatelink.com"); ?> and send traffic to that link. It works well for hiding affiliate links, but still affiliate networks know the sources of traffic if they come from some other website.

    Is it possible to change referrer, so that the affiliate networks would see my website, or some page on my website as a referrer and not the original source?

    Thanks in advance!

    Regards,
    DrJale
     
    DrJale, Oct 19, 2009 IP
  2. phprightnow

    phprightnow Peon

    Messages:
    296
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Using javascript's window.location command will hide your referral information. Also, you might can try header("Referer: http://newurl.com");, although I haven't tested personally, I've read that it can change referral information.
     
    phprightnow, Oct 21, 2009 IP
  3. aras

    aras Active Member

    Messages:
    533
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    60
    #3
    Meta Refresh / Window.location will reset your referrer. You can not spoof with PHP.
     
    aras, Oct 21, 2009 IP