Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
expire at 24:00
<?php
$ts1 = strtotime(str_replace('/', '-', '24:00:00'));
$ts2 = strtotime(str_replace('/', '-', date('H:i:s')));
$diff = (abs($ts1 - $ts2) * 1000);
setcookie('expire', 'test',+$diff);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment