Double Meta Refresh HELP needed

thedarkest12

Regular Member
Joined
Nov 23, 2009
Messages
476
Reaction score
123
Hi all,

Im in the process of adding a Double Meta Refresh to hide my referer on a site and hitting a snag (Im not coder!) Can someone point out where I am going wrong with the code below.

Essentially, when sending traffic to x.php, this is redirecting to y.php, which then sends to one of 4 random pages on the site. Or that's how it's supposed to work...

File x.php

Code:
<?php echo "<meta http-equiv=\"refresh\" content=\"0;url=y.php\">"; ?>

File y.php

Code:
<?php 
$page1 = "http://www.mysite.com/index.html"; 
$page2 = "http://www.mysite.com/sitemap-page-order.html"; 
$page3 = "http://www.mysite.com/money-articles.html"; 
$page4 = "http://www.mysite.com/contact-us-to-make-money-online.html"; 
$referer = $_SERVER['HTTP_REFERER']; 
$mypages = array($page1, $page2, $page3, $page4); 
$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=x.php\">"; } 
?>
 
How is the best way to test if the DMR is working.

As when I load the page, it just loops, x loads y, which loads x, which loads y etc...

I shall try putting the full URL in there and report back thank.
 
Back
Top