Allow access to stand-alone php file WordPress

You might find this informative, not sure if it will cover what you need but it explains a lot about front end Ajax for WordPress which is not exactly intuitive and it might help you out. In particular you probably need to understand how admin-ajax.php works.

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