Hi everybody! I am trying to keep track of which google/yahoo searches brought a user to my page via the $_SERRVER[‘HTTP_REFERRER’] variable.
I have these two lines at the beginning of index.php:
$referrer = $_SERVER["HTTP_REFERER"];
if (substr($referrer,0,27) != "http://www.airchartertravel")
setcookie("ac-referrer", $referrer, time()+60*60*24*365*5, "/", ".airchartertravel.com");The problem is that my cookie only stays for 5 seconds…. even though i have set it to expire five years from now. Does anybody have an idea why this might happen or a recommendation for a better way to save referrer data for later use in a form?