title: Struggling with recaptcha v2 and form submission
body: <p><a href="https://developers.google.com/recaptcha/docs/verify">https://developers.google.com/recaptcha/docs/verify</a></p>
  
  <pre><code>if(isset($_POST['submit'])){
  $recaptchaResponse = $_POST['g-recaptcha-response'];
  $secretKey = 'MYKEY';
  $request = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$secretKey."&amp;response=".$recaptchaResponse);
  
      if(!strstr($request,"false")){
  echo '&lt;div class="notification error clearfix"&gt;&lt;p&gt;&lt;strong&gt;Attention!&lt;/strong&gt; You didnt complete the captcha.&lt;/p&gt;&lt;/div&gt;';
  exit();
  </code></pre>
  
  <p>Then the rest of the php file mails the form, but its just sending anyway even if you dont complete the recaptcha. Basically if the JSON returns a false I was hoping the it wouldnt send and would display an error</p>
  
  <p>Also here is the form from the page if it helps, Ive probably done something wrong there too...</p>
  
  <pre><code>&lt;form method="POST" action="post.php" name="contactform" id="contactform" class="container"&gt;
  
              &lt;fieldset&gt;
                  &lt;div class="form-field grid-half"&gt;
                      &lt;label for="name"&gt;Name&lt;/label&gt;
                      &lt;span&gt;&lt;input type="text" name="name" id="name" /&gt;&lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div class="form-field grid-half"&gt;
                      &lt;label for="email"&gt;Email&lt;/label&gt;
                      &lt;span&gt;&lt;input type="email" name="email" id="email" /&gt;&lt;/span&gt;
                  &lt;/div&gt;
                  &lt;div class="form-field grid-full"&gt;
                      &lt;label for="message"&gt;Message&lt;/label&gt;
                      &lt;span&gt;&lt;textarea name="message" id="message"&gt;&lt;/textarea&gt;&lt;/span&gt;
                  &lt;/div&gt;                  
                  &lt;div class="form-field grid-full"&gt;
                          &lt;div class="g-recaptcha" data-sitekey="MYKEY"&gt;&lt;/div&gt;
                  &lt;/div&gt;
              &lt;/fieldset&gt;
              &lt;div class="form-click grid-full"&gt;
                  &lt;span&gt;&lt;input type="submit" name="submit" value="Submit" id="submit" /&gt;&lt;/span&gt;
              &lt;/div&gt;
  
              &lt;div id="alert" class="grid-full"&gt;&lt;/div&gt;
          &lt;/form&gt;     
  </code></pre>