Delete all cookies set (PHP)

by spyka (http://www.spyka.net)

Simply replace domain.com with your domain. This code will delete all cookies currently set by the domain it is run on.

Code:
<?
foreach($_COOKIE as $key => $value) {
    
setcookie($key,$value,time()-10000,"/",".domain.com");
}
?>

Code demo

Not available

Help and comments

Discuss this and other scripts in our webmaster foruns

Learn more about our forums