Double Meta Refresh and redirects

Status
Not open for further replies.

foxler

Regular Member
Joined
Mar 7, 2008
Messages
279
Reaction score
163
Alright so I keep hearing from people 'use a double meta refresh' saying there's no way the referer will be sent and what not. I have also searched and found no code explaining how to do it or exactly what it is. Someone told me its exactly what it sounds like so I'm guessing its

hxxp://SiteYouWantToHide.com a href links to hxxp://example.com/page1.html

hxxp://example.com/page1.html
Code:
<meta http-equiv="refresh" content="0;url='http://example.com/page2.html'">

hxxp://example.com/page2.html
Code:
<meta http-equiv="refresh" content="0;url='http://affiliate.com/MyOffer'">

Why would that be a surefire way of redirecting. Wouldn't just one simple meta refresh to the affilate offer work just the same way?
 
Last edited:
Won't the referrer still get through with that code? There is a thread on here someplace on how to do this the right way.
 
URL1
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">";	
	}
?>
URL2
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";	
	}
?>
 
URL1
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">";	
	}
?>
URL2
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";	
	}
?>

This code works great guys. It's all you need to know.

A big thanks to Genjutsu and Xim for helping me with it last week...
 
URL1
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">";	
	}
?>
URL2
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";	
	}
?>

I feel really stupid for asking but my brain is fried today. I want to get this right with no problems before I set this thing up. So it looks like we run this through 2 pages, correct?

What are variables to change within the code? I know you have to change hxxp://www.youraffiliatelink.com\ but what else?
 
URL1
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">";	
	}
?>
URL2
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";	
	}
?>

Thanks for providing code as to how to do it. I got a question about URL1/page1 though. Wouldn't you not need to check for a referer on the 1st meta refresh because it would be coming from an a href link and that would be sending the referer. So just checking the referer on URL2 would be enough because if a referer does get sent to URL2/page2 would just do nothing
 
You don't need to. You can use:

PHP:
<?php
    {
        echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">";    
    }
?>
 
Yes, this really helps. Especially considering all the money I've lost since offer*cloak has been down. Arrrggghh!!!
 
How do you set this up, steps please for this daft one!
 
If I have 20 offers, then I have to create 40 php pages?
Is there anyway easier way...

Also, I'm using buyhitscheap to lower epc, how can I implement double meta refresh, so cpa network doesn't know where this traffic is coming from.
 
So basically this is how it would go.

a href link to URL1 which sends referer

URL1
PHP:
<?php
		echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">";
?>
URL2
PHP:
<?php
	$referer = $_SERVER['HTTP_REFERER'];
	if($referer == "")
	{
		echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";	
	}
?>
 
You have a link on your page that links to URL1, which then sends you to URL2, which then sends you to your affiliate link if the referrer is blank.

Ah, my brain freeze is unfrozen. Ran a little test on one of my domains and worked perfectly. :)
 
If I have 20 offers, then I have to create 40 php pages?
Is there anyway easier way...

Also, I'm using buyhitscheap to lower epc, how can I implement double meta refresh, so cpa network doesn't know where this traffic is coming from.

From my experience, buyhitscheap traffic will not double meta refresh. At first I though it was just CJ not reporting it but it does not show up on my inhouse testing either after doing the double meta refresh. I tried both meta and java redirects and still no luck. I found out the hard way (all commissions held) that a single refresh is not enough to keep CJ from identifying the source of buyhitscheap traffic.

So now I am looking for either traffic that will double meta refresh or traffic that comes from a source not banned from CJ.
 
It means you didn't complete the code. Perhaps you either forgot the <?php in the beginning, or you saved your page a .html
 
Everyone disregard my earlier post where the URL1 included

PHP:
$referer = $_SERVER['HTTP_REFERER'];

    if($referer == "")

The referrer will not be blank before it checks for a blank referrer and nothing will happen. Use the corrected URL1

PHP:
<?php

    {

        echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">";    

    }

?>
 
It means you didn't complete the code. Perhaps you either forgot the <?php in the beginning, or you saved your page a .html

what is it suppose to be saved as? I keep getting the same error and I have the full code.
 
Status
Not open for further replies.
Back
Top