D
D
Denis99992015-11-27 21:06:38
PHP
Denis9999, 2015-11-27 21:06:38

How to display real cookies?

Some wrong cookies are displayed, you can look at the screenshot:
How to display real cookies?
var_dump($_COOKIE); outputs:
array(3) { ["wordpress_test_cookie"]=> string(15) "WP Cookie check" ["wordpress_logged_in_6db1d63adbfd940870bdcece524b53b5"]=> string(49) "admin|1448819999|97ebc784204cf4131e6e5cbba0759665" ["wtimep-set-s-1 "]=> string(10) "1448647200" }
and alert( document.cookie ); :
wordpress_test_cookie=WP+Cookie+check; wp-settings-time-1=1448647200

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
nelson, 2015-11-27
@nelson

Both of your functions (both php and js) output the same cookies, only PHP as an array, and JS as a single line separated by a semicolon.
In addition, the wordpress_logged_in_ cookie is not visible in JS - because it was most likely marked as http_only when exposed and not accessible from JavaScript on the page.

M
Miku Hatsune, 2015-11-27
@Hatsune-Miku

var_dump($_COOKIE);
Not?

I
Immortal_pony, 2015-11-27
@Immortal_pony

What's not to like about removed cookies?
What did you do and what did you want to achieve?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question