Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function AuthMeCheck($username, $password) {
- $host = "127.0.0.1";
- $id = "root";
- $pass = "pass";
- $dbn = "authme";
- $db = mysqli_connect($host, $id, $pass, $dbn, 3306);
- $authmeTable = 'authme';
- if($pwd = explode('$', mysqli_fetch_assoc(mysqli_query($db, 'SELECT password FROM '.$authmeTable.' WHERE username="'.$username.'"'))['password']))
- if(strcasecmp(trim($pwd['3']), hash('sha256', hash('sha256', $password).$pwd['2'])) == 0)
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement