Jump to content

send traffic to a certain page first time and if they hit back button to another


jasonst78

Recommended Posts

Hi everyone,

 

I am wondering if there is a way to implement something into this code that; (1) if the referer is set properly from google.com, it will always send the initial traffic to http://mysiteA.com; (2) but when the back button is pressed it will send them to the other links besides  http://mysiteA.com.

 

<?php
$ref = $_SERVER["HTTP_REFERER"];
if (strpos($ref,'google.com')!==FALSE) {
$urls = array
("http://mysiteA.com",
"http://mysiteB.com",
"http://mysiteC.com",
"http://mysiteD.com",
"http://mysiteE.com");

$url = $urls[array_rand($urls)];

header("Location: $url");
}
?> 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.