1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Referer Access Control Script

Discussion in 'PHP & Perl' started by alex.b, Jul 18, 2009.

  1. alex.b

    alex.b Junior Member

    Joined:
    Jun 30, 2009
    Messages:
    176
    Likes Received:
    49
    Hi Everyone,

    I'm trying out a method to hide my traffic source from CPA networks and would need a script for it. I can only do very basic php stuff so I really need some help here. The script should do the following:

    check referer
    if referer = site.com redirect to landingpage.com
    else* = redirect to errorpage.com

    *: either the referer is different than site.com or referer is blank

    If anybody knows how to do this, I would be greatly appreciate if you could could tell me how to accomplish this :) I searched the forums for "php referer", "referer script", "referer access control" etc. but nothing what I was looking for came up.
    Also, I'm not sure if you need PHP or Javascript for it, so please bear with me if this is posted in the wrong subforum of the script section.

    Thanks,
    Alex
     
  2. cyklotrial

    cyklotrial Regular Member

    Joined:
    Oct 13, 2008
    Messages:
    248
    Likes Received:
    82
    Location:
    Wonderland