Wednesday, November 9, 2016

explode(,)

$_SESSION['pincode'] = md5($rand) . ',' . time();
...
$vcode = explode(',', $_SESSION['pincode']);
if ((time() - $vcode[1]) > self::$timer) {
return 'Verification Code Time out! '.(time() - $vcode[1]);
} elseif ($vcode[0] == md5($value)) {
return 'PASS';
} else {
return "Verification Code doesn't match!";
}
...

No comments:

Post a Comment