Autor Zpráva
WordpressKokos
Profil
Zdravím,

Mám nový kód pro neviditelnou captchu pro verifikování uživatelů:

if(isset($_POST['Submit'])){
      if($_SERVER["REQUEST_METHOD"] == "POST")
{
    
        if(isset($_POST['g-recaptcha-response'])) {
    $secretKey = 'xxxxxxxxxxxxxxxxxxx';
    $response = $_POST['g-recaptcha-response'];     
    $remoteIp = $_SERVER['REMOTE_ADDR'];


    $curl = curl_init();
    curl_setopt($curl, CURLOPT_URL, 'https://www.google.com/recaptcha/api/siteverify');
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 5);
    curl_setopt($curl, CURLOPT_TIMEOUT, 10);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
    $result = curl_exec($curl);
    $error = !$result ? curl_error($curl) : null;
    curl_close($curl);

    var_dump($result);

    $result = json_decode($result); 
    
    if ($result->success == true)

<form id="mainForm" name="reload" action="" method="post">
<input type="hidden" name="Submit" />
<button class="loginmodal-submit g-recaptcha" data-sitekey="xxxxxxxxxxxxxxxxxxx" data-callback="submitreload" style="display: none;"></button>
</form>

<script type="text/javascript">
function submitreload( )
{
    document.getElementById("mainForm").submit();
}
window.onload = setInterval( submitreload, 1*60*1000 );
</script>

Takhle se verifikuje captcha každou minutu pči načtení stránky, a neustále to hazí error, wrong captcha.

PLS HELP

Vaše odpověď

Mohlo by se hodit


Prosím používejte diakritiku a interpunkci.

Ochrana proti spamu. Napište prosím číslo dvě-sta čtyřicet-sedm:

0