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

Why does the if($referer == "") not work with .co.cc??

Discussion in 'Affiliate Programs' started by JJohn, Jan 8, 2010.

  1. JJohn

    JJohn Newbie

    Joined:
    Nov 2, 2009
    Messages:
    48
    Likes Received:
    5
    I have a blog where I put this sort of code:
    <?php
    $referer
    = $_SERVER['HTTP_REFERER'];
    if(
    $referer == "")
    {
    echo
    "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";
    }
    ?>


    When for the referer I put a site like http://www.example.co.co, it doesn't redirect. Why is that? If I put any other domain, its fine.
    Is it because it's a subdomain? Should I type it differently?
     
    Last edited: Jan 8, 2010
  2. JJohn

    JJohn Newbie

    Joined:
    Nov 2, 2009
    Messages:
    48
    Likes Received:
    5
    anyone??? am i really the only one for who this happens???? no way
     
  3. radi2k

    radi2k Junior Member

    Joined:
    Nov 29, 2009
    Messages:
    117
    Likes Received:
    34
    Location:
    Germany
    actually there are no programming mistakes. there is also no difference for subdomains or some subpaths if any exist. are you sure that you have updated the correct file? check the source in your browser and clear the cache beforehand!
     
  4. pavan

    pavan Elite Member

    Joined:
    Mar 30, 2008
    Messages:
    1,603
    Likes Received:
    432
    it wont work because you must be using there frame method
    referrer wont be sent to frame which is loaded under the main domain
    so I think thats the problem that you are facing
     
  5. pyronaut

    pyronaut Executive VIP

    Joined:
    Dec 9, 2008
    Messages:
    1,229
    Likes Received:
    1,422
    Im not 100% sure about .co.cc.

    But for domains like .au.tt or other ones you get from http://www.joynic.com/. The referrer is actually the domain (The site is framed basically). Which is good in some cases because it can be used as a cloaking method.

    There is an easy way to test this. Create a page on your .co.cc domain.

    And use :

    Code:
    <?php
    $referer = $_SERVER['HTTP_REFERER']; 
    echo $referer;
    ?>
    
    And it will tell you what your referrer is. If its always .co.cc. Then there's your problem :)
     
    • Thanks Thanks x 1