Install Google reCAPTCHA v3

Поделиться
HTML-код
  • Опубликовано: 1 янв 2025

Комментарии • 133

  • @seanmcdonnell5864
    @seanmcdonnell5864 6 лет назад +15

    This is very good information I have been searching for. Thank you for taking the time to make this video. There are like no videos on V3! thank you so much.

    • @ahmadgalamli
      @ahmadgalamli 4 года назад +1

      It is still true in 2020! I have searched about it a lot, but couldn't find great content until I find this guy! Liked and Subbed!

  • @kevinpreston5260
    @kevinpreston5260 5 лет назад +40

    In my opinion that yellow translucent dot is more annoying than helpful.

  • @vectorcrush
    @vectorcrush 2 года назад +2

    Great tutorial! Straightforward and easy to follow. Thanks for including your source code.

  • @BarnabyPerrinAldous
    @BarnabyPerrinAldous 5 лет назад +5

    Thanks to your tutorial I managed to protect my site against a tonne of webform spam. A great video thank you so much! Liked and subbed :)

  • @Graytuna
    @Graytuna 4 года назад +13

    Warning headphone users: 3:59

  • @gullyCZ
    @gullyCZ 5 лет назад

    A great video that transparently shows the implementation of reCaptcha v3. It helped me a lot. Thank you!

  • @lareid2062
    @lareid2062 4 года назад +1

    BEST video instructions I found.

  • @vipvegas3244
    @vipvegas3244 5 лет назад +1

    you are the man, I would have never figured it out without this video, thank you soooo much

  • @DavidAshby1
    @DavidAshby1 10 месяцев назад

    I have several forms on one page. They all have a recaptcha field but obviously the id needs to be unique. I have an additional string being added to ensure each form has a unique id in the recaptcha field however I am unsure whether Google require the id field to remain as id="g-recaptcha-response" or is it just the name attribute that they use for generating the feedback?

  • @DavidAshby1
    @DavidAshby1 4 года назад +1

    Hi, since you did this tutorial things appear to have changed a little. I am running on localhost the same as you but I am not getting the feedback statements, Success or you are a robot. Instead it directs me to Xampp dashboard. Any ideas as to why? Thanks.

    • @VicodeMedia
      @VicodeMedia  4 года назад +1

      I am assuming that you are running this script in a subfolder on your localhost. Make sure you save it in htdocs root folder or update the action on your form

    • @DavidAshby1
      @DavidAshby1 4 года назад +1

      @@VicodeMedia hi, I have the css files in a subfolder and everything is working as expected. Thanks again for your help.

  • @NedumEze
    @NedumEze Год назад

    Thank you very much, Sir.
    If you development environment is not localhost, but a Virtual Host, how do you add its domain in the V3 Captcha settings page?

  • @Jan-yn4tl
    @Jan-yn4tl 5 лет назад +1

    note: some might end up with NULL response when the file_get_contents is disabled on server.

    • @HaraldWirth
      @HaraldWirth 5 лет назад +1

      Use CURL instead and use curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);

    • @banjerboefify
      @banjerboefify 4 года назад +1

      @@HaraldWirth SSL_VerifyPeer is not needed! Just make sure the URL is correct www.google.com/recaptcha/api/siteverify?secret='.SECRET_KEY.'&response='.$token

  • @chrisbowyer
    @chrisbowyer 6 лет назад +3

    Very good! Google's explanation is vague - to say the least. Also, PHP is a bit foreign to me but managed to transpose reCAPTCHA v2 to reCAPTCHA v3 using ColdFusion with your tutorial. Thank you!

  • @amadriz127
    @amadriz127 5 лет назад +1

    Nice tutorial, works flawlessly!!

  • @BjrnErikSandbakk
    @BjrnErikSandbakk 6 лет назад +2

    Hi, and thanks for a great tutorial. One question: Is the php script at the top necessary, or did you just insert it to see if everything works?

    • @VicodeMedia
      @VicodeMedia  6 лет назад

      Hi! Yes you need that script to get the response from Google. You get the score and based on it you take action.

    • @imkuntox
      @imkuntox 6 лет назад

      @@VicodeMedia but is the only action taken in your code an echo? or does it post the email if the score is above 0.5?

  • @MrThronx
    @MrThronx 4 года назад +1

    Excellent tutorial, super clear and simple! Thanks.

  • @smeeegheeeed1
    @smeeegheeeed1 5 лет назад +2

    Great video my friend - cleared a lot up for me thank you

  • @fernandos1790
    @fernandos1790 4 года назад

    Thank you for this post...How come you didn't use Automatically bind the challenge to a button?

  • @thisisstockmarketustat4608
    @thisisstockmarketustat4608 Год назад

    I added recaptcha v3 after watching your video, but I after submitting the form I am getting g-token in my email along with the message. Please tell how to resolve this issue

  • @aledc777
    @aledc777 4 года назад +1

    Thank yoy so much!! I have been able to implement it thanks to your video!!!! Regards from Argentina.

  • @jflying2167
    @jflying2167 4 года назад

    Is it possible to set an action (if) response is < 0.5 in order to verify if they are indeed a robot? Basically a way to confirm if reCaptcha labels them as bad traffic by mistake. Possibly 2-factor-authentication or email verification?

  • @blink625
    @blink625 4 года назад

    How do you bring up the captcha validation if it is a robot?

  • @greggeneraux
    @greggeneraux 2 года назад

    Thanks for the tutorial. But it’s important to note that the token will expire in 2 minutes. In your example, it’ll expire 2 minutes after the page is loaded. A user will often take longer than 2 minutes to complete a form. Therefore executing the reCAPTCHA for a form should take place upon clicking the form submit button, not on page load. Nearly all v3 videos I’ve watched implement the reCAPTCHA with this same usability problem.

  •  3 года назад +1

    BRO I LOVE YOU

  • @NTD1683
    @NTD1683 2 года назад +1

    thank you , it worked well for me , a great video for a newbie like me

  • @DavidAshby1
    @DavidAshby1 Год назад

    Ater putting a contact form with ReCaptcha in, following the tutorial, onto a live domain I get the following error
    file_get_contents(): wrapper is disabled in the server configuration by allow_url_fopen=0
    From reading many posts, some of which suggest changing allow_url_fopen=0 to allow_url_fopen=1 and many more saying this causes many more problems than it resolves, security wise I found a few saying to use curl instead of file_get_contents.
    Have you come accross this issue, and if so, how did you resolve it?

  • @maanmaans7393
    @maanmaans7393 4 года назад

    Could you advice me on how to set the recaptcha actions in WordPress ? Everything else appears great.

    • @VicodeMedia
      @VicodeMedia  4 года назад

      Are you trying to create a plugin? There are plugins like Contact Form 7 and Gravity Forms that have this functionality integrated. You just have to generate a secret key.

  • @alfonzomckinzee8906
    @alfonzomckinzee8906 4 года назад +1

    Awesome! Thank you so much. Saved me a lot of time.

  • @haskell3702
    @haskell3702 6 лет назад +1

    Very well explained, good job!!!!

  • @shovexitxaside
    @shovexitxaside 5 лет назад +1

    If you want to avoid hearing loss, DO NOT WEAR HEADPHONES!

  • @soniablanche5672
    @soniablanche5672 4 года назад

    shouldn't you be using
    if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    }
    to check if it's a POST request?

    • @listentomusic621
      @listentomusic621 4 года назад

      I use if ($_SERVER['REQUEST_METHOD'] === 'POST') to check

  • @Etherapydocs
    @Etherapydocs 4 года назад +1

    Excellent Job. Thank you. Very helpful!

  • @marsaintarshiva
    @marsaintarshiva 4 года назад

    Won't work, object(stdClass)#1 (2) { ["success"]=> bool(false) ["error-codes"]=> array(2) { [0]=> string(22) "invalid-input-response" [1]=> string(20) "invalid-input-secret" } }

    • @VicodeMedia
      @VicodeMedia  4 года назад

      Hi! Did you try the source code from GitHub?

  • @NicolasSilvaVasault
    @NicolasSilvaVasault 6 лет назад

    getting a strange fatal error related with... facebook!?!?! when i submit my form (which only asks for name, email, subject and comment), it appears that recaptcha is asking for facebook all.js and is trying to login for some reason

  • @odysseyshippingltd5712
    @odysseyshippingltd5712 5 лет назад

    How do I debug if I always get "invalid-input-response" returned when getting the response? I have verifies that the Secret key is correct and that the token is being passed to the response page

    • @JesusGarcia-bs3vu
      @JesusGarcia-bs3vu 5 лет назад

      Did you get a solution for this problem¿ I am in the same trouble right now...
      Anyway this helpful video is awesome! thanks to @Vicode Media

  • @nimmakayalanadh2001
    @nimmakayalanadh2001 3 года назад

    How to do it in magento2

  • @mahsudunnabinixon5265
    @mahsudunnabinixon5265 6 лет назад +3

    Thanks for good explanation.

  • @mariongabwe
    @mariongabwe 3 года назад

    Hi, when I follow your codes, some of the code on the top of my page. (success == true && $Return->score >0.5{ echo "

    • @VicodeMedia
      @VicodeMedia  3 года назад

      Hi! Can you be more explicit please?

  • @JulianPerez1
    @JulianPerez1 5 лет назад

    Thank you sir. I have noticed that Google maps API documentation and now for me Google-reCaptcha documentation are not enough to run those services without looking outside the official documentation. Someone knows what's the reason or I am wrong? Anyway, thank you very much.

  • @aziiz_farhat
    @aziiz_farhat 5 лет назад

    Thank you for the tutorial, it's useful and very clean ;)

  • @WofWca
    @WofWca 5 лет назад +1

    Spook button 👉 3:59

  • @shruthia6658
    @shruthia6658 3 года назад

    Hi, Thanks for it, But we can change hidden input to text through inspect element? so any other option for it?

    • @VicodeMedia
      @VicodeMedia  3 года назад

      So what if you can do that? What's wrong with it? 😁

    • @shruthia6658
      @shruthia6658 3 года назад

      @@VicodeMedia Then you can change the key value as well

    • @VicodeMedia
      @VicodeMedia  3 года назад

      That key value changes all the time and only you have access to it. It's unique for everyone and only you can see it on your end

  • @masudkarkhi6583
    @masudkarkhi6583 5 лет назад

    sir, I want to say that I work a different type of website. recent show this problem at a fixed time and regular occurred. someone tell me that' you have to buy dedicated IP & it will help to solve this problem. please help me which is best for using............at the same time other users log in this website and perform work but I cannot do that, how it is solved?
    this problem is..... There is a high number of applications being processed at the moment. Please try again later

  • @blink625
    @blink625 4 года назад

    How do you pop up a check box for recapture or pictures to authenticate the user?

  • @matheustrovao2648
    @matheustrovao2648 5 лет назад

    Hey, I can't send the email, I follow everything you say but my var_dump return "invalid-input-response", what I can do?

  • @kazimbasarci
    @kazimbasarci 5 лет назад +1

    Perfect Man!. You are great!

  • @solmazkhosravi4355
    @solmazkhosravi4355 5 лет назад +1

    The sound quality is awful

  • @thefbi3742
    @thefbi3742 4 года назад

    How
    I need it because of my roblox i cant log in

  • @bronzememorials9714
    @bronzememorials9714 5 лет назад +2

    Fantastic Video Thank You.

  • @TiagoAguiar
    @TiagoAguiar 5 лет назад +1

    thankyou so much.. help me a lot!

  • @anuchons
    @anuchons 6 лет назад +2

    Yesssss!!! Thank you!!

  • @vaibhavsonawane7230
    @vaibhavsonawane7230 5 лет назад

    Thanks for the video, helped a lot:)

  • @prashantbhandari
    @prashantbhandari 5 лет назад +2

    great vid but beware at 3:58

  • @MegaLennex
    @MegaLennex 5 лет назад

    Can you do reCaptcha for amp page. Thank you.

  • @rafinhacap5
    @rafinhacap5 4 года назад

    How do i lower my google score on other websites?

    • @VicodeMedia
      @VicodeMedia  4 года назад

      By changing the rule in you if statement where you check the score

    • @rafaelmondini2518
      @rafaelmondini2518 4 года назад

      @@VicodeMedia and do you have tip to get mu score higher so that when the recaptcha appears i dont have to select the images?

  • @dannyemmerik1556
    @dannyemmerik1556 3 года назад

    Thank you Sir, you helped me out-. I successfully implemented on a website.

  • @marcohiltebrand6471
    @marcohiltebrand6471 5 лет назад

    Hi, thanks for the code, this really helps. Anyway, i am still struggeling to extend the code to be able to display a different DIV on success/failure. The idea is to use it on an order form, on success it should hide the input form and show the confirmation information to the user and on failure it should show the error information. Any idea how to accomplish this?

  • @amy2905
    @amy2905 5 лет назад

    Sir, thank you very much for your effort. This was a huge help for me. One tiny question please... I wanted to hide the JS code after the form as everyone can see the source. Have created extra file in the dedicated JS folder and entered the path in the form file. Now a token wont be generated and the message is always "You are a robot". Is it an issue if I leave the the JS code with the SITE_KEY on the form page or even better, is there a way to hide the code?
    Thanks in Advance
    Lyubo

  • @uk8955
    @uk8955 4 года назад

    hi, thank you for this info, can you advise how to post the form to an email address?

    • @VicodeMedia
      @VicodeMedia  4 года назад +1

      Do you want to send an email with the submitted data?

  • @matthewrichardson8162
    @matthewrichardson8162 5 лет назад +1

    Great video! How is this better than a honey pot variable?

    • @VicodeMedia
      @VicodeMedia  5 лет назад +1

      Honeypot form protection means that an invisible field is added to a form. If this invisible field is filled out (bots will usually put in a value), then the form will return an error. Normal users (read: human beings) won't ever see the field, so they won't fill it out. Even if they do, the field is labeled in such a way as to indicate the human shouldn't fill out the field.
      This is not foolproof, though, as many spam bots can detect hidden fields, and they can also be adapted to work around a particular field on your site (this isn't typically the case for smaller sites, though).
      Google reCAPTCHA learns by seeing real traffic on your site and then it returns a score (1.0 is very likely a good interaction, 0.0 is very likely a bot). Based on the score, you can take variable action in the context of your site.
      In my opinion the honey pot method is good for smaller sites but when you get bigger it's good to use reCAPTCHA or both.

    • @matthewrichardson8162
      @matthewrichardson8162 5 лет назад +1

      @@VicodeMedia Awesome. Thanks for the response!

    • @kakanet1903
      @kakanet1903 3 года назад

      @@VicodeMediavcizek

    • @kakanet1903
      @kakanet1903 3 года назад

      0

  • @listentomusic621
    @listentomusic621 4 года назад +1

    This code is actual now?

  • @mrscreamer379
    @mrscreamer379 4 года назад +1

    Beware this guy. He'll mumble quietly, you'll turn up your volume, and at the 4 minute mark he is going to ping a windows notification and blow your ear drums out.

  • @KakoPopraviti
    @KakoPopraviti 4 года назад

    very useful, thank you so much!

  • @alejandrorosales
    @alejandrorosales 5 лет назад +1

    very usefull! thank you!

  • @danmg
    @danmg 5 лет назад

    Hello. This is a great tutorial. it explain really good how to do it.
    But I have a problem, and i hope you can help me.
    I have my website in HMTL5, the contact form on submit call a send.php file it contains the info of the form, and if everything is correct, the website call a javascript file it shows the personalized message for "succes" or if is wrong or something is not writed it will show the personalized message for "error".
    I am trying for months to intagrete recaptcha in my website.
    At the beginning i had no idea how to do it (Thanks to your tutorial i start now to understand how it runs).
    But this tutorial explain how to intagrate in a very simple contact form.
    How can I do to integrate it with my personalized files?
    I copied your code and intagrate like yours.
    for it i change my contact.html to contact.php site.
    Then I used the code exactly like you but of course with my keys.
    The thing is that my website is completed designed, and yours a very simple site.
    At the end of the tutorial we can see the answer of google under the button "submit", but it is dont shown on my web site. But i see everytime the recaptcha logo on my web site in the same place where its allways showed.
    For my tests i put the input type for recaptcha as text, and I can see the feld on the form, but i never have the answer of google as succes like you in your tutorial.
    If i try to fill the form everything look as i programmed and the emails are also sended and also its call my javascript to show me the personalized messages for "succes" or "error". For this reason i am not sure if recaptcha is running like it have to do it.
    I am checking my emails and i am receiving my emails, but i never came the info of google anywhere.
    Thanks for your time.
    I really appreciate if you answer and if we can talk about it because i receive really to much spam every day and its something really stressful.
    I also try to force a minimun of characters on the message text, but also I continues receiving the same spam (and all them are short text though I force a minimun of characters).
    Best regards!

  • @sofianemouman
    @sofianemouman 5 лет назад

    thanks Vicode !

  • @rehdogg
    @rehdogg 4 года назад

    Voice too low and going too fast

    • @VicodeMedia
      @VicodeMedia  4 года назад

      Thank you for your feedback! 👍

  • @richardjbarrett1
    @richardjbarrett1 3 месяца назад

    why cant anything be correct and upto date nothing you have written is on google v3 for e.g. where is this in your video
    function onClick(e) {
    e.preventDefault();
    grecaptcha.ready(function() {
    grecaptcha.execute('reCAPTCHA_site_key', {action: 'submit'}).then(function(token) {
    // Add your logic to submit to your backend server here.
    });
    });
    }

  • @Alpr1010
    @Alpr1010 3 года назад

    Solid tutorial, but doesn't really show to actually use it in a real website.

    • @VicodeMedia
      @VicodeMedia  3 года назад

      Thanks, but what do you mean by a real website? Isn't the form in the video enough to understand how to secure your website?

  • @mediaapps
    @mediaapps 4 года назад

    Thank you for this. I had no trouble following the video. It hasn't worked for me yet though.

    • @VicodeMedia
      @VicodeMedia  4 года назад

      John, I answered to your email... You just need to change the form action

    • @mediaapps
      @mediaapps 4 года назад +1

      @@VicodeMedia Huge thank you for that Victor.

  • @Hiesler777
    @Hiesler777 5 лет назад +1

    I am having troubles, I am getting NULL back in the dump!

  • @supbra1
    @supbra1 4 года назад

    if file_get_contents is not working for you, you can use this function instead:
    function getCaptcha($captcha){
    $ch = curl_init();
    curl_setopt_array($ch, [
    CURLOPT_URL => 'www.google.com/recaptcha/api/siteverify',
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => [
    'secret' => SECRET_KEY,
    'response' => $captcha,
    'remoteip' => $_SERVER['REMOTE_ADDR']
    ],
    CURLOPT_RETURNTRANSFER => true
    ]);
    $output = curl_exec($ch);
    curl_close($ch);
    $json = json_decode($output);
    return $json;
    }

  • @amy2905
    @amy2905 5 лет назад

    I can see the key also here:
    I gues it is not an issue in this case that my key is visible

    • @VicodeMedia
      @VicodeMedia  5 лет назад +1

      Your key is restricted to the domains you entered in the Domains text area whenever you registered your project on google.

    • @amy2905
      @amy2905 5 лет назад

      @@VicodeMedia Understood. thanks a lot :-)

  • @andreluizpimentel7053
    @andreluizpimentel7053 4 года назад

    Very good!!!

  • @riccardo1234
    @riccardo1234 2 года назад

    Thanks so much !!!!!!!!!!

  • @unrealdigital
    @unrealdigital 5 лет назад +1

    excelente, didático e prático

  • @redbull__7
    @redbull__7 4 года назад

    Thanks bro!

  • @trudnynick
    @trudnynick 4 года назад

    I do not fucking get it. Docs on google actually says that its easy, you need to copy 10 lines of code - and its not working in my case. I am checking youtube tutorial - it has tons more. I do not get it..

  • @ahmedabbood
    @ahmedabbood 4 года назад +1

    awesome

  • @АндрейБелый-ы6ш
    @АндрейБелый-ы6ш 4 года назад +1

    Спасибо!

  • @negonifas
    @negonifas 5 лет назад +1

    thank you

  • @tymiller2596
    @tymiller2596 5 лет назад +1

    I guess Google updated the reCaptcha pages and I'm seeing completely different things than what your tutorial is illustrating. Totally not helpful.

  • @trudnynick
    @trudnynick 4 года назад

    SO shit sound quality T_T

  • @thisisstockmarketustat4608
    @thisisstockmarketustat4608 Год назад

    Nice

  • @Thaulopi
    @Thaulopi 4 года назад

    recaptcha is no longer free