diff options
| author | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-17 22:11:11 +1100 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@n0v4.com> | 2011-02-17 22:11:11 +1100 |
| commit | e93efbfc23dd7770cb8916edf0bd26a003fd226b (patch) | |
| tree | 5c34ebc99327674773fe5b304af23bc0a8d1cf95 | |
| parent | 7622e84b62d9bddeeeb4a9785f7bc9b77d9aeea3 (diff) | |
More advanced bot protection
| -rw-r--r-- | inc/functions.php | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/inc/functions.php b/inc/functions.php index 8b6ac65a..08b1ff25 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -668,7 +668,37 @@ $content = ''; foreach($inputs as $name => $value) { - $content .= '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />' . "\n "; + $display_type = rand(0, 8); + + switch($display_type) { + case 0: + $content .= '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'; + break; + case 1: + $content .= '<input style="display:none" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'; + break; + case 2: + $content .= '<input type="hidden" value="' . htmlspecialchars($value) . '" name="' . htmlspecialchars($name) . '" />'; + break; + case 3: + $content .= '<input type="hidden" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" />'; + break; + case 4: + $content .= '<span style="display:none"><input type="text" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" /></span>'; + break; + case 5: + $content .= '<div style="display:none"><input type="text" name="' . htmlspecialchars($name) . '" value="' . htmlspecialchars($value) . '" /></div>'; + break; + case 6: + $content .= '<textarea style="display:none" name="' . htmlspecialchars($name) . '">' . htmlspecialchars($value) . '</textarea>'; + break; + case 7: + $content .= '<textarea name="' . htmlspecialchars($name) . '" style="display:none">' . htmlspecialchars($value) . '</textarea>'; + break; + case 8: + $content .= '<div style="display:none"><textarea name="' . htmlspecialchars($name) . '" style="display:none">' . htmlspecialchars($value) . '</textarea></div>'; + break; + } } // Create a hash to validate it after |
