Did you try to just print the contents $_COOKIE? The mine contains the following:
Array
(
[wordpress_test_cookie] => WP Cookie check
[wordpress_logged_in_
)
It should be easy for you to make out.
foreach($_COOKIE as $key => $value) {
if(preg_match('@^wordpress_logged_in_@', $key) {
$cookie = explode('|', $_COOKIE[$key]);
$username = $cookie[0];
}
}
source
share