Code generator
When you are logged in, you can generate these five blocks of code that should be inserted into your page's html code. The whole process takes less than 5 minutes and it does not require any advanced programming skills.
Captcha iframe code
This block needs to be inserted into your html form, right before your submit button. Every time when you change the captcha type or language, the old code in your form needs to be replaced with the newly generated code. Below is just a sample code, do NOT use it; it is to illustrate how the code looks like:
<iframe id="capt" width="320" height="433" frameborder="0" src="" style="padding:0px;margin:0px; "></iframe>
Add this line to your form
The following line needs to be added to your html form at any place between the beginning and the end of the form:
<input type="hidden" name="cptchver" id="cptchver" value="">
Add this code to the end of the file
The following block needs to be added to the end of the file that contains the html form.
<script> document.getElementById("cptchver").value='Verified'; var https=window.location.toString().includes("https://");if(https!=true) {document.getElementById("cptchver").value='Error'; alert('Only https protocol is supported');} var src=document.getElementById('capt').src+'&ref='+window.location.hostname; document.getElementById('capt').src=src; window.addEventListener( "message", function (e) { if(e.origin !== ''){ return; } document.getElementById("cptchver"); }, false); </script>
Form processor code
Add the following code to the beginning of the form processing php script. It stops the execution of the php script if the answer to the captcha question is wrong. You can customize the message "Incorrect answer to the captcha question".
$cptchver=$_POST['cptchver'];if($cptchver<>'Verified') {echo '<font color=red>Incorrect answer to the captcha question</font>'; exit;}
Optional code
To optimize mobile browser experience, the following code is recommended to be added within the head section of the html code. This code sets default mobile zoom level to "1". Without this code mobile vistors may need to zoom the page if you don't already have this line added.
<meta name="viewport" content="width=device-width, initial-scale=1">