I have 2 DMR (Double Meta Refresh) scripts. Which one of these will successfully blank the referrer?

4 replies

So I have two scripts I found on the web. I tried them both out. They both seem to work. But I just want to make sure since I've never used dmr before. So wanna get it right before I start using it to hide my traffic source...
Here's the first one:

<?php

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

?>

---------------------------------------------------------------

<?php

$referer
= $_SERVER['HTTP_REFERER'];

if(
$referer == "")

{

echo
"<meta http-equiv=\"refresh\" content=\"0;url=http://www.youraffiliatelink.com\">";

}

?>

I saved the first one that is above the line as 1.php. The domain is www.mydomain.com/sub/1.php. The url entered where it says
URL2 I put in www.mysite.com/bob/2.php

I saved second one below the line as 2.php and the url for it is mysite.com/bob/2.php
Next I entered where it says url=http://www.youraffiliatelink.com I put in my affiliate link

Does this sound right? I tried it and it went from mydomain.com/sub/1.php to mysite.com/bob/2.php to the affiliate offer so I'm guessing this is all i need for it to work correctly right? Is the referrer blank? Seems that way...how do I make sure for certain..


Here's the second script from another site:

<html>
<head>
<meta http-equiv="refresh" content="0;url=http://xyz.com/pathtofile2.php" />
</head>
</html>
---------------------------------------------------------------
<html>
<head>
<meta http-equiv="refresh" content="0;url=http://xyz.com/offer.php" />
</head>
</html>

For the one above the line I saved the text file as 100.php and the domain is mydomain.com/pop/100.php Where it says
http://xyz.com/pathtofile2.php I replaced that with mysite.com/mas/101.php

For the one below the line I saved the text file as 101.php and the url is mysite.com/mas/101.php. Where it says
url=http://xyz.com/offer.php I replaced that with my affiliate link myaffiliatelink.com



Same as previous script when type in mydomain.com/pop/100.php it redirects to
mysite.com/mas/101.php and then goes to the affiliate offer. Again like the previous script it went to the affiliate offer. Does that mean that the referrer is successfully blanked? How can I make certain?

Which one of these scripts would you guys prefer if either? Thanks.....

In addition if I were to have a third domain myweb.com/blah and have it redirect to
www.mydomain.com/sub/1.php
which would then redirect to mysite.com/bob/2.php which would redirect to the aff offer, would that do anything to mess the script up or not blank the referrer or anything? Seems to work fine but just want to make sure..
#blank #blank referer #dmr #double #meta #referrer #refresh #scripts #successfully
  • Profile picture of the author rgenterprise
    Can ANYONE answer? I'm pretty sure I did it right. Just want to make sure......
    {{ DiscussionBoard.errors[1297554].message }}
  • Profile picture of the author CliveG
    Are you simply trying to hide where your traffic came from?

    If you are using PHP, a much simpler redirect script is:

    <?php
    header('Location: http://www.example.com/');
    ?>
    {{ DiscussionBoard.errors[1298603].message }}
    • Profile picture of the author rgenterprise
      Originally Posted by CliveG View Post

      Are you simply trying to hide where your traffic came from?

      If you are using PHP, a much simpler redirect script is:

      <?php
      header('Location: http://www.example.com/');
      ?>
      Yes I want to hide where the traffic is coming from. Are you saying that neither of the two scripts above would do that successfully.

      Would I just replace this (below) with your suggestion? anything else that would need to be changed?
      <?php

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

      ?>
      {{ DiscussionBoard.errors[1298843].message }}
  • Profile picture of the author Gail Sober
    Redirect to a page with a snippet of php to display the referrer and test

    You can find the code here
    show referring URL - PHP examples and code snippets

    Be careful though, some affiliate programs view too many "no referrers" as possible spammers/cookie stuffers while others go so far as to redirect "no referrers" through their own cookies or to other offers, so test that out as well.
    {{ DiscussionBoard.errors[1298909].message }}

Trending Topics