Hi I am trying to redirect to pages on my blog with this code:
<?php
$page1 = "myblog/wordpress/?p=22";
$page2 = "myblog/wordpress/?p=20";
$page3 = "myblog/wordpress/?p=18";
$page4 = "myblog/wordpress/?p=15"; $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\">"; } ?>
Is there anything wrong with it? (apart from the URLS) because it just returns an error. Could anyone here give me the correct code for me to insert my URLS?
<?php
$page1 = "myblog/wordpress/?p=22";
$page2 = "myblog/wordpress/?p=20";
$page3 = "myblog/wordpress/?p=18";
$page4 = "myblog/wordpress/?p=15"; $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\">"; } ?>
Is there anything wrong with it? (apart from the URLS) because it just returns an error. Could anyone here give me the correct code for me to insert my URLS?