note 52081 deleted from function.setcookie by bjori

From: Date: Mon, 08 Jan 2007 10:45:30 +0000
Subject: note 52081 deleted from function.setcookie by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-121424@lists.php.net to get a copy of this message
Note Submitter: support at duggen dot net ---- Addition to "Carl V"s note. Thanks for the note. Here is a way to delete alle cookies and cookie arrays from your domain. $cookiesSet = array_keys($_COOKIE); for ($x = 0; $x < count($cookiesSet); $x++) { if (is_array($_COOKIE[$cookiesSet[$x]])) { $cookiesSetA = array_keys($_COOKIE[$cookiesSet[$x]]); for ($c = 0; $c < count($cookiesSetA); $c++) { $aCookie = $cookiesSet[$x].'['.$cookiesSetA[$c].']'; setcookie($aCookie,"",time()-1); } } setcookie($cookiesSet[$x],"",time()-1); }

« previous php.notes (#121424) next »