Using plugin functionality in external php script not working

You’re probably calling the function before it’s defined – why not hook into it?

Something like:

function someFunction() {
  require( '/full/path/to/wp-blog-header.php' );
} 
add_action('some_hook', 'someFunction');

Note: You might try the plugins_loaded hook.

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