Page 1 of 1
[help]cookie obtaining without header
Posted: Sat Jul 16, 2011 5:28 am
by Th3Proph3t
hi everyone ive had this question so i decided to signup here
im a newbie programmer in PHP ofc...
can anyone tell me any way to get cookie without header?
Re: [help]cookie obtaining without header
Posted: Sat Jul 16, 2011 6:01 am
by oscardog
Not sure I understand the question, to get a cookie's value you simply use...
Code: Select all
$myCookie = $_COOKIE['cookie_name'];
Re: [help]cookie obtaining without header
Posted: Sat Jul 16, 2011 6:28 am
by Th3Proph3t
thanks for the reply but i already know that

i mean ALL the cookies...
ones i know are:
$cookie = '<script>document.write(document.cookie);</script>';
$cookie = ''; foreach($_COOKIE as $x =>$actor) {$cookie .= $x."=".$actor.";";}
$cookie =''; foreach($_REQUEST as $x =>$actor) {$cookie .= $x."=".$actor.";";}
$cookie = $_SERVER['HTTP_COOKIE'];
but none of these are what i need. anyone have any other ways for grabbing cookies?