note 49688 deleted from function.setcookie by bjori
| From: | bjori@php.net | Date: | Wed, 27 Dec 2006 13:39:12 +0000 |
| Subject: | note 49688 deleted from function.setcookie by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-120952@lists.php.net to get a copy of this message | ||
Note Submitter: José Enrique Serrano Expósito
----
For listing all the cookies readed in the client machine.- echo sHTTP_COOKIE_VARS();
<?php
function sHTTP_COOKIE_VARS() {
global $HTTP_COOKIE_VARS; // $HTTP_COOKIE_VARS is not exist in a function
$sEcho = '';
$iCookies = 0;
ForEach( $HTTP_COOKIE_VARS As $vIndex => $vValue ) {
$iCookies++;
if( is_array( $vValue ) ) {
foreach ( $vValue as $vIndex2 => $vValue2 ) {
$sEcho .=
'$HTTP_COOKIE_VARS[\'<b>'.$vIndex."</b>']['".$vIndex2.'\']
== "'.
$vValue2.'"<br>';
}
} else {
$sEcho .= '$HTTP_COOKIE_VARS[\'<b>'.$vIndex.'</b>\'] ==
"'.
$vValue.'"<br>';
}
}
$sEcho .= $iCookies.' cookies listed.';
return $sEcho; ///
}
?>