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

Double Meta-Refresh blanking not working wtf?

Discussion in 'Affiliate Programs' started by nitro909, Jun 22, 2010.

  1. nitro909

    nitro909 Registered Member

    Joined:
    Jan 24, 2010
    Messages:
    92
    Likes Received:
    20
    I had this working a month ago, now when I try it it no longer works. Can anyone please tell me wtf I'm doing wrong here? This is exactly the same method I was using for months:

    Three files. index.php, second.php and links.txt.

    Index.php:

    Second.php:

    Links.txt:

    Everytime I go to index.php it fires me off to Google which is the site I set to go to if the ref isn't blanked. Tried this on two different servers.

    Anyone? :(
     
  2. kaidoristm

    kaidoristm Power Member

    Joined:
    Feb 13, 2009
    Messages:
    561
    Likes Received:
    726
    Occupation:
    Freelancer
    Location:
    Estonia
    Home Page:
    Try this

    Code:
    <?php
    
    // Open our links file
    $sites = array_map("trim", file("links.txt"));
    
    // Grab a random URL
    $redirect = $sites[array_rand($sites)];
    
    $referer = $_SERVER['HTTP_REFERER'];
    
    if($referer != "")
    {
    // Referrer is not blank send traffic to our homepage
    echo "<meta http-equiv=\"refresh\"  content=\"0;url=http://www.google.com\">";  
    }
    
    else
    {
     // Redirect to our Random URL 
    echo "<meta  http-equiv=\"refresh\"content=\"0;url=http://".$redirect."\">"; 
    }
    
    ?> 			 		
    
     
  3. nitro909

    nitro909 Registered Member

    Joined:
    Jan 24, 2010
    Messages:
    92
    Likes Received:
    20
    Thanks, this is so weird. I paste the link in and it goes to the cpa link but when I click the link on a site, say facebook...it goes to Google.

    any ideas?
     
  4. kaidoristm

    kaidoristm Power Member

    Joined:
    Feb 13, 2009
    Messages:
    561
    Likes Received:
    726
    Occupation:
    Freelancer
    Location:
    Estonia
    Home Page:
    Simple your referer isn't blanked then. If you paste your link into browser then by default your referer is blank.
     
  5. CClark56

    CClark56 Regular Member

    Joined:
    May 25, 2009
    Messages:
    298
    Likes Received:
    128
    Location:
    Indiana
    Pay attention to the code... It clearly takes you to Google when your referrer isn't blank... What browser are you using?
     
  6. nitro909

    nitro909 Registered Member

    Joined:
    Jan 24, 2010
    Messages:
    92
    Likes Received:
    20
    If I paste the link it works but if I have the link on a page and click it it doesn't work. I'm using chrome and ie.
     
  7. kaidoristm

    kaidoristm Power Member

    Joined:
    Feb 13, 2009
    Messages:
    561
    Likes Received:
    726
    Occupation:
    Freelancer
    Location:
    Estonia
    Home Page:
    Just be a bit clearer what are you trying to do.
    As i understand you wish to send visitor to google if he's referer isn't blanked.
    And if it's blanked redirect them to offer or am i wrong.
     
  8. nitro909

    nitro909 Registered Member

    Joined:
    Jan 24, 2010
    Messages:
    92
    Likes Received:
    20
    Yeah that's exactly it.

    I am trying to send them to an offer, if the ref is not blanked then I set it to go to Google.

    When I type the link in manually into the browser (ANY browser) it redirects correctly to the cpa offer.

    However when I post the link to a page as in right here:

    http://www.mylink.com

    and click it it goes to Google. :(