meta random redirect with random seconds.
<?php
$offers = array(
"http://www.url1.com",
"http://www.url2.com",
"http://www.url3.com",
"http://www.url4.com"
);
$referer = $_SERVER['HTTP_REFERER'];
if($referer == "") {
$url = $offers[rand(0, count($offers) - 1)];
echo "<meta http-equiv='refresh' content='0;url=$url'>";
}
else
{
echo "<meta http-equiv='refresh' content='0;url=http://www.firstpage.com'>";
}
?>
i need some one to add the random seconds .. thank you
You have to generate a random number
echo "<meta http-equiv='refresh' content='0;url=$url'>";
will be:
echo "<meta http-equiv='refresh' content='".mt_rand(0,20).";url=$url'>";
to redirect between 0 and 20 seconds.