Beruflich Dokumente
Kultur Dokumente
QapTcha description
QapTcha is a draggable jQuery captcha system with jQuery UI ! QapTcha is an easy-to-use, simple and intuitive captcha system. It needs human action instead of to read a hard text and it is a very lightweight jQuery plugin. In order to work with iPhone and iPad, a file jquery.ui.touch.js has been added in v2.5 ! QapTcha works with PHP5.2 or more cause to the function json_encode() !
if(isset($_SESSION['qaptcha_key']) && !empty($_SESSION['qaptcha_key'])) { $myVar = $_SESSION['qaptcha_key']; if(isset($_POST[''.$myVar.'']) && empty($_POST[''.$myVar.''])) //mail can be sent else //mail can not be sent } unset($_SESSION['qaptcha_key']);
Even if javascript is disabled, the iQaptcha input will not be create and the PHP control always returns false : (isset($_POST[''.$myVar.'']). Moreover, the SESSION will not be create and PHP will always returns false : (isset($_SESSION['qaptcha_key']) && $_SESSION['qaptcha_key']).
images
php
QapTcha.jquery.php index.php
QapTcha implementation
1. First, include the CSS & jQuery files
<!-- include CSS & JS files --> <!-- CSS file --> <link rel="stylesheet" type="text/css" href="QapTcha.jquery.css" media="screen" /> <!-- jQuery files --> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="jqueryui.js"></script> <script type="text/javascript" src="jquery.ui.touch.js"></script> <script type="text/javascript" src="QapTcha.jquery.js"></script>
QapTcha options
autoSubmit Boolean Default : false - if true, auto-submit form when the user has dragged it to the end PHPfile String Default : 'php/Qaptcha.jquery.php' - PHP file path autoRevert Boolean Default : true - Slider returns to the init-position, when the user hasn't dragged it to end disabledSubmit Boolean Default : true - Add the "disabled" attribut to the submit button : true or false txtLock String Default : 'Locked : form can't be submited' - Text to display when form is locked txtUnlock String Default : 'Unlocked : form can be submited' - Text to display when form is unlocked