Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created January 20, 2021 04:57
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 parzibyte/859ec37e0486a335e529b4836a31190f to your computer and use it in GitHub Desktop.
Save parzibyte/859ec37e0486a335e529b4836a31190f to your computer and use it in GitHub Desktop.
<?php
$nombreCookie = "mi_cookie_visitas";
# Para eliminar una cookie, se pone la fecha de expiración en una fecha anterior
$tiempoExpiracion = time() - 1;
setcookie($nombreCookie, "", $tiempoExpiracion);
# Y redireccionamos a index.php
header("Location: index.php");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment