php - Recaptcha POST doesn't work with my secret key -


i have form sending email recaptcha, work when use test site-key , secret key found in recaptcha faq recaptcha faq

but when insert mine doesn't work, i,ve tried recreate keys problem still remain... suggest? here's php code:

<?php      $response = file_get_contents('https://www.google.com/recaptcha/api/siteverify?secret=my_secret_key&response='.$_post['g-recaptcha-response'].'&remoteip='.$_server['remote_addr']);     $responsedecoded  = json_decode($response);     if ( $responsedecoded->success == false ) {        echo 'busted!';        exit();     }     else{        //here insert code sending email     } ?> 

i think problem here.

secret=my_secret_key 

replace my_secret_key actual secret_key in file_get_contents().


Comments

Popular posts from this blog

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -