Code: Select all
<?php
if($_SERVER['HTTP_REFERER'] != "")
{
$random = rand(0, 2);
$aff_array = array("http://www.website1.com",
"http://website2.com",
"http:/website3.com");
header("Location: ".$aff_array[rand(0,2)]);
exit();
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>What I'm wondering is when the visitor is redirected to website1, website2, or website3. Is it possible to have the same type of script as above but, in reverse? If the visitor has a referer they stay on the same page and if they don't have a referer then they are redirected to another different webpage? say for example website4.com ?
Thanks