title: google recaptcha returns false due to "invalid-input-secret"
body: <p>I have installed the latest recaptcha from google but it always returns false upon post submit and always returning "invalid-input-secret" error even though the verification is always correct from the frontend view. What could be the reason on this. Btw I am testing everything in localhost xampp with phalcon framework. Here is the part where I check the captcha:</p>
  
  <pre><code>protected function validate_data($post, $ip){
  
      $validation = new Validation();
      $validation-&gt;add(
          'user_name',
          new PresenceOf(
              array(
                  'message' =&gt; 'The Username is required'
              )
          )
      );
      $validation-&gt;add(
          'email',
          new PresenceOf(
              array(
                  'message' =&gt; 'The e-mail is required'
              )
          )
      );
      $validation-&gt;add(
          'password',
          new PresenceOf(
              array(
                  'message' =&gt; 'The Password is required'
              )
          )
      );
      $validation-&gt;add(
          'cpassword',
          new PresenceOf(
              array(
                  'message' =&gt; 'The Confirmation Password is required'
              )
          )
      );
      $validation-&gt;add(
          'email',
          new Email(
              array(
                  'message' =&gt; 'The e-mail is not valid'
              )
          )
      );
  
      $validation-&gt;add('password', 
          new Confirmation(array(
             'message' =&gt; 'Password doesn\'t match confirmation',
             'with' =&gt; 'cpassword'
             )
          )
      );
  
      $error = $validation-&gt;validate($post);
      $errors = array();
      if(count($error)){
          foreach($error as $e){
              $errors[] = $e;
          }
      }
  
      $data = array(
          'secret' =&gt; "my secret key",
          'response' =&gt; $post['g-recaptcha-response'],
          'remoteip' =&gt; $ip
      );
  
      $verify = curl_init();
      curl_setopt($verify, CURLOPT_URL, "https://www.google.com/recaptcha/api/siteverify");
      curl_setopt($verify, CURLOPT_POST, true);
      curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
      curl_setopt($verify, CURLOPT_SSL_VERIFYPEER, false);
      curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
      $res = curl_exec($verify);
  
      $captcha = json_decode($res);
  
      if($captcha-&gt;success == false){
          $errors[] = "Invalid Captcha, You are a freakin robot!";
      }
  
      return $errors;
  
  }
  </code></pre>
  
  <p>what could be the reason here? here is the output when you dump the response:</p>
  
  <pre><code>object(stdClass)#70 (2) { ["success"]=&gt; bool(false) ["error-codes"]=&gt; array(1) { [0]=&gt; string(20) "invalid-input-secret" } } 
  </code></pre>