Clear Unset All Domain Cookies
This will clear (expire/unset) all domain cookies quickly:
$cookies=array_keys($_COOKIE);
$domain=”.mydomain.com”;
foreach($cookies as $cookie){
$when=time()-3600;
setcookie($cookie, “”, $when, “/”, $domain);
}
// Don’t forget to refresh the browser:
header(”location: somenewpage.php”)