readme update and comments added to code
This commit is contained in:
parent
14a81a7425
commit
fb38c4b744
2 changed files with 4 additions and 3 deletions
|
@ -1,3 +1,3 @@
|
||||||
# contactform
|
# contactform
|
||||||
|
|
||||||
A craft and bot resistant contact form
|
A spam and bot resistant contact form. Remeber to update the URL and e-mail address this sends to if you use it.
|
|
@ -2,7 +2,8 @@
|
||||||
// Form code for mail submissions
|
// Form code for mail submissions
|
||||||
// For usage with hugo site
|
// For usage with hugo site
|
||||||
|
|
||||||
// Anti exploit code, not perfect but should throw a wrench into a bot's plan
|
// Anti exploit code, not perfect but should throw a wrench into a bot's plan
|
||||||
|
// This code has been used on several sites before and does seem to do a decent job, not perfect but pretty good
|
||||||
|
|
||||||
session_start();
|
session_start();
|
||||||
|
|
||||||
|
@ -48,7 +49,7 @@ class antibot {
|
||||||
return $passfail;
|
return $passfail;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function test_input($data) {
|
private function test_input($data) { // Cleans the input
|
||||||
$data = trim($data);
|
$data = trim($data);
|
||||||
$data = stripslashes($data);
|
$data = stripslashes($data);
|
||||||
$data = htmlspecialchars($data);
|
$data = htmlspecialchars($data);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue