I am creating an external application for which user credentials will be taken from the user table of the WordPress site database
WordPress uses PHPass hashing, I cannot verify the username and password for my external application, because the password in the database table 'users'hashed
I am trying to verify a simple password with a hashed password using a function wp_check_password, but I did not work, nothing was written with this code
<?php
$password = '965521425';
$hash = '$P$9jWFhEPMfI.KPByiNO9IyUzSTG7EZK0';
require_once('/home/nhtsoft/public_html/project/wp-includes/class-phpass.php');
function wp_check_password($password, $hash) {
global $wp_hasher;
if ( empty($wp_hasher) ) {
$wp_hasher = new PasswordHash(8, true);
}
$check = $wp_hasher->CheckPassword($password, $hash);
return apply_filters('check_password', $check, $password, $hash);
}
?>
this code gives me a blank page.
How do I verify this password so that I can use these WordPress credentials to enter the app’s look?