jasonst78 Posted October 4, 2009 Share Posted October 4, 2009 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"); } ?> Link to comment https://forums.phpfreaks.com/topic/176461-send-traffic-to-a-certain-page-first-time-and-if-they-hit-back-button-to-another/ Share on other sites More sharing options...
jon23d Posted October 4, 2009 Share Posted October 4, 2009 The only way I can think of it is to use a dispatcher of some sort, or to use javascript. Link to comment https://forums.phpfreaks.com/topic/176461-send-traffic-to-a-certain-page-first-time-and-if-they-hit-back-button-to-another/#findComment-930241 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.