Double Meta Refresh and redirects

Status
Not open for further replies.
Why is that? Do certain client-side settings eventually take the blank? Otherwise, it seems you run the risk of getting your traffic caught in an infinite loop.

@seikooc

np. The code is not exactly correct. I rushed it, but someone with a little PHP background should get the gist I think. Gimme4Free added more than I do, but essentially filled in the gaps (I think) for the PHP n00b.
If you look aty my code I pasted it does not loop. It simply checks for blank, if not blank checks again, if still not blank then it passes them to an alternate URL. I have found that this increases the blanking success rate.

Change myafflink.com to your afflink. Change alternatepage.com to another of your sites or affiliate links that does not mind blackhat traffic and the referrer leaking.
 
Just want to make sure to not make mistake

I will use first code on my black hat website and send visitors to a link to my White hat website
for example : http://www.blackhatURL.com/link1.php

Link1.php code:
Code:
<?php
        echo "<meta http-equiv=\"refresh\" content=\"0;url=[B][COLOR="White"]http://www.whitehatURL.com/link2.php[/COLOR][/B]\">";
?>

Link2.php is located on my White hat website and it will send visitors to affiliate link

Link2.php code:
Code:
<?php
    $referer = $_SERVER['HTTP_REFERER'];
    if($referer == "")
    {
        echo "<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";    
    }
?>

Please confirm me if its ok
 
Just a question please if anyone can help. What is the difference between manually using the codes shared in this thread to using CPA Redirector for WP. Is one form of DMT safer than the other? In CPA Redirector I believe you can use either java or DMR, which would be safest? Thanks.
 
NX_NULL, yes, you've pretty much got it. I like to add a little twist on mine. With the code below, if your AM goes to check your referring url stats, they will get real pages that have the banner promoting the offer.

Meanwhile you are sending everyone to your blackhat url which doesn't display any of the content, and sends surfers directly to the offer page.

link1.php code:
Code:
<script>window.location="http://www.whitehatURL.com/link2.php";</script>
link2.php code:
Code:
<?
    $referer = $_SERVER['HTTP_REFERER'];
    if($referer == "http://www.blackhatURL.com/link1.php")
    {
        echo '<script>window.location="http://www.youraffiliatelink.com/";</script>';
        exit();
    }


//put real content here along with a banner 
//for whatever you are promoting
?>
So basically: If the hit comes from your blackhat site send them directly to the offer, otherwise send them to a regular page that has a banner to the offer. Using this method it will be difficult for anyone to discover how you are getting the traffic to them.

Does anyone see an issue with using window.location?



Just want to make sure to not make mistake

I will use first code on my black hat website and send visitors to a link to my White hat website

Please confirm me if its ok
 
NX_NULL, yes, you've pretty much got it. I like to add a little twist on mine. With the code below, if your AM goes to check your referring url stats, they will get real pages that have the banner promoting the offer.

Meanwhile you are sending everyone to your blackhat url which doesn't display any of the content, and sends surfers directly to the offer page.

link1.php code:
Code:
<script>window.location="http://www.whitehatURL.com/link2.php";</script>
link2.php code:
Code:
<?
    $referer = $_SERVER['HTTP_REFERER'];
    if($referer == "http://www.blackhatURL.com/link1.php")
    {
        echo '<script>window.location="http://www.youraffiliatelink.com/";</script>';
        exit();
    }


//put real content here along with a banner 
//for whatever you are promoting
?>
So basically: If the hit comes from your blackhat site send them directly to the offer, otherwise send them to a regular page that has a banner to the offer. Using this method it will be difficult for anyone to discover how you are getting the traffic to them.

Does anyone see an issue with using window.location?

I heard in some CPA networks the referrer can still leak using this method? Is this true?
 
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.

If you know php, you could craft your links like so:
Code:
http://www.site.com/url1.php?id=1
http://www.site.com/url1.php?id=2
http://www.site.com/url1.php?id=3
ect....

Then use php to get the id number at the end if the URL. Then use CASE and IF statements. In an overview it is saying if id=1 then show this link. If id=2 show this link. If you needed to add another offer.. just add another id number and add it to your CASE statements.

Then 2 files, can handle infinite amount of affiliate links. Just by tracking the id number.

Also, in this case we are using 2 files. An in and an out for the DMR. So in the first file, you need to GET the id. Then when directing it to the second file for output, you would add the ID.. So file1 will be getting the ID from the url. Then add it to the end of the second file. The second file will contain all of the CASES and IFs.
 
Last edited:
Great thread, but I am still confused.

Can someone help in setting up a good DMR for CPA offers.
Will pay for help.

PM me if you can help me.
 
I got it working for IE and FireFox but not Chrome....

Chrome seems to leak refferer like some of the other minor browsers. I'd suggest running a php check to see if its IE or Firefox.
Don't mess with the other browsers since its like less the 5% and PROBABLY not the target you are trying to refresh anyhow.

If you are into coding, you can find some examples here:
http://php.net/manual/en/function.get-browser.php

If you need more help, I can dig my goto code out.
 
Ok, <sigh>
I am having an issue with the code. Hopefully someone on here can point me in the right direction. Here is the background info: I am using wordpress...the site I am testing out my first DMR on is a subdomain hosted with Hostgator I have an image (banner) non-iframe, that I am trying to link to the CPA offer.

I have loaded the two .php files ftp through filezilla in the website subdomain folder. I named the files url1.php and url2.php here is the code i used....


url1.php
PHP:
<?php 
          echo "<meta http-equiv=\"refresh\" content=\"0;url=URL2\">"; 
?>

url2.php
PHP:
<?php 
     $referer = $_SERVER['HTTP_REFERER']; if($referer == "") 
     { 
          echo "<metahttp-equiv=\"refresh\"content=\"0;url=http://myaffiliatelink.com\">";     
     } 
?>

So when I click on the link to test the DMR it directs me to a page not displayed, BUT the address is mysite.com/url1.php (for the page not displayed) It doesn't direct to the url2.php and then to the affiliate link. ANY HELP OR IDEAS as to how to fix this or what I am doing wrong is greatly appreciated!!!
 
How do we find out what site the referrer was? I have some cloaked stuff on facebook, I would like to find out if it says facebook, or something else.
 
How do we find out what site the referrer was? I have some cloaked stuff on facebook, I would like to find out if it says facebook, or something else.

You'd set that up in your first meta refresh script, capture the HTTP_REFERER variable. You could also try embedding Google Analytics on that first meta-refresh.
 
You'd set that up in your first meta refresh script, capture the HTTP_REFERER variable. You could also try embedding Google Analytics on that first meta-refresh.


So, set up a database with a table named referrer with fields of id, link_ref, then add some php to my 1sturl and grab the referrer field?

PHP:
$referer = $_SERVER['HTTP_REFERER'];
$ref = "Insert into referrer (link_ref) values('".$referer."')";

Something simple like that?
 
Yes, something like that.

You could get a little more granular and add date, time, ip as well.

Then you could add a query to the top to check if that IP has already visited that offer once today and decide what to do with them, etc.

If you wanted to be crazy about it, you could grab a geo-ip DB or use a geo-ip API and add the country to the DB or filter them based on acceptable countries to keep your traffic quality high.

Personally, I prefer setting clean referers over DMR anyway, to me the DMR is an "oh shit" button in case the traffic somehow slipped past the other checks.
 
And if you just want the fool-proof method why nit just use Brads CPA Redirector?

Code:
http://www.contentgeneration.org/cpa-redirector-2/

This fakes the referrer and is dead simple to use. Brad is a member here too.
 
I'm using referer guardian. similar to cpa redirector. works great with wordpress and has extr festures too.

double meta is too much problems.
 
I'm using referer guardian. similar to cpa redirector. works great with wordpress and has extr festures too.

double meta is too much problems.

do you have a back-issue problem? i've used cpa redirector but it has that back button issue where you tried to click back and it keeps on fwding you to the offer.

i've seen this done too...when u click a link on adwords..it goes to domainA.com..then it redirects to domainB.com really quick and then to the offer. would that show the referrer as domainA or domainB?
 
catspurley
i am very new to this field, i understand the meta refresh process and the codes that has to be prepared. But please help me
i have saved the codes in my computer. where do i upload the codes? and which website to upload? how to do it?

please help

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

i am very new to this field, i understand the meta refresh process and the codes that has to be prepared. But please help me
i have saved the codes in my computer. where do i upload the codes? and which website to upload? how to do it?

please help
 
Status
Not open for further replies.
Back
Top