I'm new to cookies, and im trying to set a cookie where to store the referrer (the org ref).
But when i try this function:
function do_it_cookie() {
// Check if cookie exists
if (isset($_COOKIE['ref'])) {
// It dose exist, do nothing or anything...
} else {
setcookie ('ref', $_SERVER['HTTP_REFERER'], time() + 60, '/');
header ("Location: http://www.nyttforetag.com/mind-your-own-business/");
}
}
Ben istiyorum dönüş ilk hakem url bilmek ise, 30 gün boyunca kullanıcı bilgisayarında çerez saklamak istiyorum.
Ama bu kullanımı ve benim sitedeki başka bir sayfaya gidin diyelim ve daha sonra kendi setleri aynı adı taşıyan ve önceki sayfanın ref ile yeni bir çerez geri ana sayfasına gidin.
Bunu önlemek için uzak var mı?