thedarkest12
Regular Member
- Nov 23, 2009
- 476
- 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
File y.php
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\">"; }
?>