Nevermind, I got it figure out.
Code:
<?
require_once('./global.php');
require("includes/functions_login.php");
// Returns true/false
$res = verify_authentication("USERNAME", "PASSWORD", md5("PASSWORD"), md5("PASSWORD"), true, true);
exit();
?>
Not 100% sure about the second MD5 password field as it's supposed to be UTF(8?) or something. Anyway, all I know is, it worked for me this way. Hope it helps someone else out.