note 52081 added to function.setcookie

From: Date: Wed, 20 Apr 2005 17:21:10 +0000
Subject: note 52081 added to function.setcookie
Groups: php.notes 
Request: Send a blank email to php-notes+get-88282@lists.php.net to get a copy of this message
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); } ---- Manual Page -- http://www.php.net/manual/en/function.setcookie.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52081 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52081&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52081&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52081&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52081&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52081&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52081&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88282) next »