Error: This key was valid for one-time ' .'use and is no longer valid.
It was already delivered to IP address ' .''.$MyIP.' on '.$MyTime.'. Please contact ' .'support immediately to have your password reset if you feel your key ' .'might have been intercepted.
'; } else { $MyPassword = $myRow->password; $MyIP = $_SERVER['REMOTE_ADDR']; $myUpdate = $pdo->prepare("UPDATE pwtool.mypasswd SET retrieved_ip = '$MyIP',retireved_time = now(),password = '' WHERE code = '$MyKey'"); $myUpdate->execute(); print 'Your password is:
'; if(strlen($MyPassword) > 20){ print '
'.$MyPassword.''; } else { print ''.$MyPassword.''; } print '
Do not hit reload on your browser. This URL is one-time use and will not show your passsword again.
'; } } else{ print '
Error: You need to supply a valid key.
'; } } else{ print 'Error: You need to supply a valid key.
'; } } elseif(isset($_REQUEST['random'])) { //captcah was used, process it $captchas = new CaptchasDotNet ('demo', 'secret', '/tmp/captchasnet-random-strings','3600', 'abcdefghkmnopqrstuvwxyz','6', '240','80','000088'); // Read the form values $password = $_REQUEST['password']; $random_string = $_REQUEST['random']; $newPassword = str_replace("'", '', trim($_POST['newPassword'])); if (!$captchas->validate ($random_string)) { // captcah error echo 'The session key (random) does not exist, please go back and reload form.Password insert succeeded. Here\'s the URL to fetch it:
'; print ''; } else { //captcah worng //print 'Nope, not here: '.$adminPassword.'
'; echo 'You entered the wrong captcah. Aren\'t you human?'; } } else { //Display New password entry form ?>