Source for file CAPTCHA_test.php
Documentation is available at CAPTCHA_test.php
if (!($file = fopen($filename, ($flags & 1 ) ? 'a' : 'w'))) {
// Start PHP session support
$msg = "Please enter the text in the image in the field below!";
if ($_SERVER["REQUEST_METHOD"] == "POST") {
if (isset ($_POST["phrase"]) && isset ($_SESSION["phrase"]) &&
strlen($_POST["phrase"]) > 0 && strlen($_SESSION["phrase"]) > 0 &&
$_POST["phrase"] == $_SESSION["phrase"]) {
$msg = "Please try again!";
require_once 'Text/CAPTCHA.php';
// Generate a new Text_CAPTCHA object, Image driver
// Get CAPTCHA secret passphrase
$_SESSION["phrase"] = $c->getPhrase ();
// Get CAPTCHA image (as PNG)
echo "<form method=\"POST\">" .
"<input type=\"text\" name=\"phrase\" />" .
"<input type=\"submit\" /></form>";
Documentation generated on Mon, 11 Mar 2019 13:58:30 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|