I know how to set a PHP Cookie and how to make it expire in a set time, say 24 hours but how can I make a cookie expire at minute before the servers midnight everyday, so 23:59?
I’ve tried the following but it doesn’t seem to set for me?
setcookie("cons", 1, mktime(24, 0, 0) - time(), "/");
You might find strtotime useful in these situations.