Advertisement
diegodcpbr

RECAPTCHA

Apr 28th, 2020
556
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.61 KB | None | 0 0
  1. <?php
  2.  
  3. $infoRecaptcha = MySql::conectar()->prepare("SELECT `tb_site.config`.`r_s_pulic_v3` FROM `tb_site.config` LIMIT 1");
  4. $infoRecaptcha->execute();
  5. $infoRecaptcha = $infoRecaptcha->fetch();
  6.  
  7. if(!empty($infoRecaptcha)){
  8.    
  9.   echo '<script src="https://www.google.com/recaptcha/api.js?render='.$infoRecaptcha['r_s_pulic_v3'].'"></script>' ;
  10.   echo '<script>
  11.  grecaptcha.ready(function() {
  12.      grecaptcha.execute(\''.$infoRecaptcha['r_s_pulic_v3'].'\', {action: \'homepage\'}).then(function(token) {
  13.        // pass the token to the backend script for verification
  14.      });
  15.  });
  16.  </script>';  
  17. }
  18. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement