buch of stuff; simple-captcha; mdtable; some more stuff
This commit is contained in:
22
bots/validate.php
Normal file
22
bots/validate.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
/* server validation scaptcha */
|
||||
|
||||
session_start();
|
||||
|
||||
header("Content-Type: application/json");
|
||||
$input = $_POST['captcha'] ?? "";
|
||||
|
||||
if (!isset($_SESSION["simple-captcha"])) {
|
||||
echo json_encode(["status" => "error"]);
|
||||
exit;
|
||||
}
|
||||
|
||||
if (strcasecmp($input, $_SESSION["simple-captcha"]) === 0) {
|
||||
unset($_SESSION["simple-captcha"]);
|
||||
echo json_encode(["status" => "valid"]);
|
||||
} else {
|
||||
echo json_encode(["status" => "invalid"]);
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user