-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
83 lines (57 loc) · 1.64 KB
/
index.php
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<html>
<head>
<title>Are you Human? CAPTCHA Image Form Valuator v1.0 EXAMPLE</title>
</head>
<body>
<center>
<FONT SIZE=5><B>Image Form Valuator v1.0</B> EXAMPLE</FONT>
<BR>
<P>Secure your Form with this free PHP script.</P>
<BR>
<?
$imgcode = "";
include "src/config.php";
for ($i=0; $i<$symbols; $i++){
$imgcode .= code(mt_rand(0,24))."|";
}
if($code && !$imagetext){
$error = 1;
$errstr = "Please Enter the image code";
}elseif($code && $imagetext){
$chart = explode('|', $code);
for ($i=0; $i<5; $i++){
$chart[$i] = decode($chart[$i]);
$chek .= $letter[$chart[$i]];
}
if($chek != strtoupper($_POST['imagetext'])){
$error = 1;
$errstr = "You entered incorrect image code";
}elseif($chek == strtoupper($_POST['imagetext'])){
$error = 1;
$errstr = "You entered Correct image code. Thank you!";
}
}
if($error) print "<FONT SIZE=4 COLOR=BB0000>$errstr</FONT>";
print <<<FO
<P class=up_nave>Demo Script</P>
<form method="POST">
<table cellpadding="5" cellspacing="1" width="100%">
<tr>
<td align="left">Validation</td><input type="hidden" name="code" value="$imgcode">
<td align="center"><img src="button.php?c=$imgcode" border=0> <input size=10 type="text" name="imagetext"></td>
</tr>
<tr>
<td align="center" colspan="2">Enter the text above to validate your submission.<BR>
<FONT SIZE=1>Reload this page if you can't read the above image</FONT>
</td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" name="submit" value="Test Form"></td>
</tr>
</table>
</form>
FO;
?>
</center>
</body>
</html>