Skip to content

Instantly share code, notes, and snippets.

@alfredfrancis
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alfredfrancis/a69c6388b78de04b56ba to your computer and use it in GitHub Desktop.
Save alfredfrancis/a69c6388b78de04b56ba to your computer and use it in GitHub Desktop.
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