-1
- Connectez-vous avec votre compte Google
2.Visit le lien recaptcha google.Google Invisible intégration Recaptch en PHP
3. Ensuite, suivez le lien vers l'intégration de code, suivez le code pour la validation client et côté serveur. https://developers.google.com/recaptcha/docs/invisible
4.Increase ou diminuer le niveau de sécurité, une fois après avoir créé la recaptcha, allez dans les paramètres avancés ici, https://www.google.com/recaptcha/admin#list
<!--
i.stack.imgur.com slash NqyVT.png
6aZNw.png
n5gfN.png
Button HTML
<div id='recaptcha' class="g-recaptcha"
data-sitekey="put the key here"
data-callback="onSubmit"
data-size="invisible"
data-callback="callback"></div>
<button id='btnsubmit' class="c-button--primary">Submit</button>
//Apply the exact script from document
//PHP Validation
if($_POST['g-recaptcha-response'] != ''){
$post_data = http_build_query(['secret'=>'put the secret key here', 'response'=>$_POST['g-recaptcha-response'] ]);
$ch = curl_init();
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_URL, 'https://www.google.com/recaptcha/api/siteverify');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
// Send the request
$result = json_decode(curl_exec($ch), true);
// Free up the resources $curl is using
curl_close($ch);
//print_r($result);exit();
$hostname = strtolower($result['hostname']);
//echo $hostname.' - '.$result['success'];exit();
if($result['success'] == 1 && ($hostname == 'www.yousiteurl.com')){
//Write here actual execution code for email or data submit
}
}
-->
Quelle est votre question? –