How to determine from a different folder (outside wordpress) if a visitor is logged into WordPress

To use all the WordPress functions in any non- WordPress pages, you can use

define( 'WP_USE_THEMES', false ); 
Include_once('wp-load.php');

Then, is_user_logged_in() will work, and user cookie, session and id could be retrieve.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)