Google reCAPTCHA in a web form

Using HTML5, JS/jQuery/Ajax, CSS3, Bootstrap, PHP

Documentation here:

https://developers.google.com/recaptcha/docs/display

Practiced here: http://www.followthesun.com.cy/contactus.php

To-Do the same here in this Article Web Log/Video Log:

http://www.latchiquads.com/contactus.html

http://www.polistaxi.com/contacts.php

http://www.poliscyprusquads.com/contactus.html

Notes:

http://www.latchiquads.com/contactus.html

in the webpage HTML5/CSS3/JS/JQUERY code.

http://www.latchiquads.com/contactus.html

<script type="text/javascript">

  var reC = "";

  var verifyCallback = function(response) {
        //console.log(response);
        //reC = response;
        $("#g-recaptcha-response").val(response);
      };
  var onloadCallback = function() {
    grecaptcha.render('html_element', {
      'sitekey' : 'site key',          
            'callback' : verifyCallback
    });
  };
</script>
                                    <div class="form-group">
                                      <label class="control-label col-md-3" for="comment"> </label>
                                      <div class="col-md-9">
                                        <div id="html_element"></div>
                                      </div>                                            
                                    </div>
in case of JS Conflicts --- try a different position of 
<script src="php/webformsPHPajax2017.js?2021"></script>
<script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit" async defer></script>
</body> 

D:\htdocs_xampp\Latchiquads.com\php\webformsPHPajax2017.js

$(document).ready(function() {

var url = "php/contactus.php";
$('#send1').click(function(e){
    e.preventDefault();
    e.stopPropagation();
    //alert("send1");

  $.ajax({url: url, type: 'POST',
  data:
  {
    name: escapeHTML($('#name').val()),
    email: escapeHTML($('#email').val()),
    phone: escapeHTML($('#phone').val()),
    comments: escapeHTML($('#comment').val()),
    token: escapeHTML($("#g-recaptcha-response").val())
  },
  error: function() {
      $("#alertMsg").html('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><strong>Error!</strong> Something went wrong, check your email and retry!</div>');     
  },
  success: function(response){
    console.log(response);
    if (response=="true")                 
      $("#alertMsg").html('<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><strong>Success!</strong> We will reply ASAP!! See your email box for confirmation!</div>');
    else      
      $("#alertMsg").html('<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert" aria-label="close">&times;</a><strong>Error!</strong> Something went wrong, check your email and retry!</div>');      
    }
  });
    return false;
});

D:\htdocs_xampp\Latchiquads.com\php\contactus.php

$token = $_POST[“token”];

function httpPost($token)
{

$data = array(
    "secret" => "secret key", 
    "response" => $token
);    
foreach($data as $key=>$value) { $fields_string .= $key.'='.$value.'&'; }
rtrim($fields_string, '&');

$data_string = json_encode($data);                                                                                                         
$ch = curl_init('https://www.google.com/recaptcha/api/siteverify');                                                                      
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");                                                                     
curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);                                                                  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);                                                                      

$result = json_decode(curl_exec($ch));    

return $result->success;

}

function quickContactProcess($name,$email,$phone,$comments, $token) {

$captchaOK = httpPost($token);

if ($response == “false” || $captchaOK != 1) {
//die (“The reCAPTCHA wasn’t clicked. Go Back and try it again.”);
$response = “false”;
} else {
$response = “true”;
}

quickContactProcess($name,$email,$phone,$comments, $token);
?>

http://www.poliscyprusquads.com/contactus.html

soon!

http://www.polistaxicyprus.com/contactus.html

soon!

http://www.polistaxi.com/contacts.php

soon!

How to unzip multiple fileX.zip to folders simultaneously

how-to-unzip-multiple-files with 7-zip

 

[embedyt] https://www.youtube.com/watch?v=ej4JBWxJGz0[/embedyt]

https://www.7-zip.org/download.html

 

===============================================

 

how-to-unzip-multiple-files with Python 3

 

 

 

[embedyt] https://www.youtube.com/watch?v=Nnx8AzD3mXo[/embedyt]

https://www.python.org/downloads/

 

Python Scripts DOWNLOAD Here

https://lse-blogs.s3.eu-west-1.amazonaws.com/Scripts/scripts-python3-blog-lse-unzip-multiple-files-once.zip

How To Check If My PC Is Windows 11 Compatible

How To Check If My PC Is Windows 11 Compatible

>>>>>>>> Go >>>>>>>>

Upgrade to the New Windows 11 OS | Microsoft

https://www.microsoft.com/en-us/windows/windows-11

Check for compatibility

Use the PC Health Check app [14MB] to see if your current PC meets the requirements to run Windows 11. If so, you can get a free upgrade when it rolls out.

#Windows_11, #TPM, #TPM2.0, #TPM2, #BIOS_TPM, #BIOS_TPM_2.0, #UPGRADE_To_Windows_11

Applied BIOS Setting Change/Fix – Now My PC is Windows 11 Compatible

03:30 – PC Not Compatible – PC Health Check App – Alert
03:53 – Enter BIOS – Asus Motherboard [ Del or F2 ]
06:10 – PC Now is Compatible – PC Health Check App – Alert

=======================================
Donate
https://www.paypal.me/lsepolis123
https://www.patreon.com/lsepolis123

Skype
lwdlse or lselwd
Blog
http://www.LeonidasSavvides.com/blog/
Facebook
https://www.facebook.com/leonidas.e.s…
Twitter
https://twitter.com/lwdlse
Instagram
https://www.instagram.com/leonidassav…

Editing Software: Adobe Premiere Pro / Windows 10 Pro