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

Showing a CPA offer in my own domain and blocking referrer works on FF but not on IE7...

Discussion in 'CPA' started by Fingus, Nov 7, 2008.

  1. Fingus

    Fingus Registered Member

    Joined:
    May 19, 2008
    Messages:
    57
    Likes Received:
    91
    Occupation:
    Computer Technician
    Location:
    Spain
    I´m trying to set some code to show a CPA offer within my own domain in full page and blocking the referrer at the same time, in fact it looks like it works fine on Firefox but it gets on an infinite loop on IE7, like it can´t blank the referrer (goes straight to else condition in randompage.php, i confirmed that by modifying rd1.php in randompage.php to another domain and it always goes there, instead of the CPA offer link, when Firefox opens the CPA offer in my own domain without changing to the real url in the address bar just fine)
    Any idea about how to make it work properly on both browsers? :)

    Here is the code

    file: index.html
    Code:
    <iframe src="rd1.php" frameborder=0 scrolling="auto" width="100%" height="100%"> This browser can not use IFRAME. </iframe>
    
    Also tried with this and the same happens:
    Code:
    <frameset rows="100%">
      <frame src="rd1.php">
    </frameset>
    
    index1.php
    Code:
    <?php 
    echo "<meta http-equiv="refresh" content="0;url=randompage.php">"; 
    ?>
    
    randompage.php
    Code:
    <?php 
    $page0 = "http://afflink.com";
    $referer = $_SERVER['HTTP_REFERER'];
    $mypages = array($page0);
    $myrandompage = $mypages[mt_rand(0, count($mypages) -1)];
    if($referer == "")
        {
            echo "<meta http-equiv="refresh" content="0;url=$myrandompage">";
        }
    else
        {
        	echo "<meta http-equiv="refresh" content="0;url=rd1.php">";
        }
    ?>
    
     
    Last edited: Nov 7, 2008
  2. Fingus

    Fingus Registered Member

    Joined:
    May 19, 2008
    Messages:
    57
    Likes Received:
    91
    Occupation:
    Computer Technician
    Location:
    Spain
    I just confirmed that IE7 is not blocking the referrer at all with this setup, by changing rd1.php in the else condition to checkref.php (see code below), it displays the referrer when it shouldn´t.
    I also must mention that whithout the frame code rd1.php and randompage.php blank the referrer fine in both browsers.
    (Just realized that i put index1.php above as the filename instead of rd1.php, but couldn´t edit the post after a few mins)

    Code:
    <?php 
    $page0 = "http://afflink.com";
    $referer = $_SERVER['HTTP_REFERER'];
    $mypages = array($page0);
    $myrandompage = $mypages[mt_rand(0, count($mypages) -1)];
    if($referer == "")
        {
            echo "<meta http-equiv="refresh" content="0;url=$myrandompage">";
        }
    else
        {
        	echo "<meta http-equiv="refresh" content="0;url=checkref.php">";
        }
    ?>
    
    checkref.php
    Code:
    <?php
    	// This Page Displays the Users IP, User Agent, and Referrer
    	$html  = "<html><head><title>Referral Check</title></head><body>";
    	$html .= "<br />Client IP: " . $_SERVER['REMOTE_ADDR'];
    	$html .= "<br />User Agent: " . $_SERVER['HTTP_USER_AGENT'];
    	$html .= "<br />Referrer: " . $_SERVER['HTTP_REFERER'];	
    	$html .= "<br />Query: " . $_SERVER['QUERY_STRING'];	
    	$html .= "</body></html>";
    
    	echo $html;
    ?>
    
     
  3. ckclark121

    ckclark121 Newbie

    Joined:
    Jan 27, 2007
    Messages:
    36
    Likes Received:
    6
    I've been searching for that answer as well. I can't seem to find it anywhere on the forum nor on Google.

    Does anybody have any suggestions on how you hide referrers while iframing an affiliate offer? We can get this working in FF using Meta refresh, but not on IE.

    Any help is appreciated :confused:
     
  4. vivalafeva

    vivalafeva Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 16, 2008
    Messages:
    1,481
    Likes Received:
    719
    i just assumed that it worked in IE cause all I use is firefox, all the code looks right. Apparently I need to fix my double meta refresh, anyone know how to fix this?
     
  5. Fingus

    Fingus Registered Member

    Joined:
    May 19, 2008
    Messages:
    57
    Likes Received:
    91
    Occupation:
    Computer Technician
    Location:
    Spain