Kurumi Tokisaki 86 Posted July 17, 2017 Share Posted July 17, 2017 Salut à vous, j'ai vue que vous ne avez pas de protection captcha pour vos rétros. bonjour les robots ^^ je vais vous dire, comment faire, pas besoin de compliqué votre vie, c'est simple: 1: Créer un compte ici: https://www.google.com/recaptcha/admin ( Faut avoir un compte google ) 2: intégration du code mettre la fonction dans une balise PHP ou vous le voulez, ou dans le Global.php <?php function isRecaptchaValid($code, $ip = null) { if (empty($code)) { return false; // Si aucun code n'est entré, on ne cherche pas plus loin } $params = [ 'secret' => 'KEY PRIVer', 'response' => $code ]; if( $ip ){ $params['remoteip'] = $ip; } $url = "https://www.google.com/recaptcha/api/siteverify?" . http_build_query($params); if (function_exists('curl_version')) { $curl = curl_init($url); curl_setopt($curl, CURLOPT_HEADER, false); curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); curl_setopt($curl, CURLOPT_TIMEOUT, 1); curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false); // Evite les problèmes, si le ser $response = curl_exec($curl); } else { // Si curl n'est pas dispo, un bon vieux file_get_contents $response = file_get_contents($url); } if (empty($response) || is_null($response)) { return false; } $json = json_decode($response); return $json->success; } ?> entre votre META ajouter ceci: <script src='https://www.google.com/recaptcha/api.js'></script> Puis après le button captcha vous le souhaiter: <div class="g-recaptcha" data-sitekey="KEY PUBLIC"></div> Après mettre pour le code de validation de la fonction qui fait appel faudra le mettre au début de votre code PHP de votre inscription comme ceci: <?php //debut du captcha verification if(isRecaptchaValid($_POST['g-recaptcha-response'])) { //VOTRE CODE DE INSCRIPTION PHP if (isset($_GET['inscrit'])) { if ($_GET['inscrit'] == 'validation') $username = Secu($_POST['bean_name']); } //fin de l'inscription //bref vous avez compris ^^ } //fin de verification ?> 3: Configuration, aller sur le panel de votre api google ou nous avons créer au début: trouver, votre clé priver : La remplacer par Key Priver dans la fonction du code mis au tout départ du tuto: $params = [ 'secret' => 'ICI METTRE VOTRE CLER PRIVER ou SECRET', 'response' => $code ]; Puis prenez la clé public: et prenez le code ou avez placer le button du captcha <div class="g-recaptcha" data-sitekey="ICI METTRE CLE PUBLIC"></div> Résultat final: https://i.gyazo.com/60c61d2e815aa260e26e907ca0e8e772.mp4 Si vous avez besoin d'aide, ne hésiter pas ! 1 #Kirito-SAO ( c'est mon ancien pseudo) Link to comment Share on other sites More sharing options...
Administrateur Solife 1,329 Posted July 17, 2017 Administrateur Share Posted July 17, 2017 Salut, Ton sujet qui se trouvait dans CMS & TEMPLATES > Ressources Habbo > Addons a été déplacé dans Ressources Habbo > Tutoriels Ceci est un message automatique. J'essaie de m'adoucir, mais l'humain me rend noir. Link to comment Share on other sites More sharing options...
Kurumi Tokisaki 86 Posted July 17, 2017 Author Share Posted July 17, 2017 il y a 1 minute, Solife a dit : Salut, Ton sujet qui se trouvait dans CMS & TEMPLATES > Ressources Habbo > Addons a été déplacé dans Ressources Habbo > Tutoriels Ceci est un message automatique. Merci #Kirito-SAO ( c'est mon ancien pseudo) Link to comment Share on other sites More sharing options...
Guest Posted July 17, 2017 Share Posted July 17, 2017 Sympa comme tutoriel, merci de ton partage Link to comment Share on other sites More sharing options...
Kurumi Tokisaki 86 Posted July 17, 2017 Author Share Posted July 17, 2017 Il y a 6 heures, Lucas Orsini a dit : Sympa comme tutoriel, merci de ton partage Merci, De rien #Kirito-SAO ( c'est mon ancien pseudo) Link to comment Share on other sites More sharing options...
Ifez 39 Posted July 20, 2017 Share Posted July 20, 2017 Bon retour, ça fait longtemps que je ne t'ai pas vu sur Hdev! Merci pour le tutoriel Signature 2.0 (mdr) Ancien responsable des pixel-artiste certifiés. A la retraite, mais si tu as besoin d'aide, contacte-moi ! Link to comment Share on other sites More sharing options...
Kurumi Tokisaki 86 Posted July 20, 2017 Author Share Posted July 20, 2017 il y a une heure, Ifez a dit : Bon retour, ça fait longtemps que je ne t'ai pas vu sur Hdev! Merci pour le tutoriel Merci, et oui je n'étais pas trop disponible, mais je suis un peux de retour et de rien. 1 #Kirito-SAO ( c'est mon ancien pseudo) Link to comment Share on other sites More sharing options...
Modérateur CptHenri 74 Posted July 21, 2017 Modérateur Share Posted July 21, 2017 Merci pour le tuto . Flemme, ils ont supprimés mon ancienne signature Link to comment Share on other sites More sharing options...
Kurumi Tokisaki 86 Posted July 21, 2017 Author Share Posted July 21, 2017 Il y a 11 heures, CptHenri a dit : Merci pour le tuto . De rien #Kirito-SAO ( c'est mon ancien pseudo) Link to comment Share on other sites More sharing options...
TuesdayATB 45 Posted July 22, 2017 Share Posted July 22, 2017 Oha oha oha !! Merci, c'est super cool comme tuto Link to comment Share on other sites More sharing options...
Kurumi Tokisaki 86 Posted July 22, 2017 Author Share Posted July 22, 2017 Il y a 10 heures, Tuesday a dit : Oha oha oha !! Merci, c'est super cool comme tuto De rien, je vais faire plein de tuto #Kirito-SAO ( c'est mon ancien pseudo) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now