ob_start(); if (!isset($_COOKIE['location'])) { setcookie("location",true,time()+(3600*24)); header('Location: https://www.google.com.tr/'); }