-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
48 lines (37 loc) · 988 Bytes
/
index.php
File metadata and controls
48 lines (37 loc) · 988 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?
include("inc/function.incl.php");
$key = crypt_encrypt(10, key_gen());
$errorMsg = '';
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 5//EN"
"http://www.w3.org/TR/html4/strict.dtd"
>
<html lang="en">
<head>
<title><!-- Insert your title here --></title>
</head>
<body>
<?
if (isset($_POST['submit'])) {
$keyWrite = $_POST['keyWrite'];
$keyCheck = $_POST['keyCheck'];
$keyCheck = crypt_decrypt(10, $keyCheck);
if ($keyWrite == $keyCheck) {
/* put inside the code in case captcha was correct
* eg: include ok mail(), etc
*/
echo ("Correct");
} else {
echo("Wrong");
}
} else {
?>
<form action="" method="post">
<img src="images/captcha.php?key=<?=$key?>" />
<input type="hidden" name="keyCheck" value="<?=$key?>" />
<input type="text" name="keyWrite" value="" />
<input type="submit" name="submit" value="check" />
</form>
<? } ?>
</body>
</html>