Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions examples/recaptcha-request-curl.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
// In production, *always* sanitise and validate your input'
?>
<h2><kbd>POST</kbd> data</h2>
<kbd><pre><?php var_export($_POST); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($_POST, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<?php
// If the form submission includes the "g-captcha-response" field
// Create an instance of the service using your secret and the CurlPost request method.
Expand All @@ -111,15 +111,15 @@
// If the response is a success, that's it!
?>
<h2>Success!</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>That's it. Everything is working. Go integrate this into your real project.</p>
<p><a href="/recaptcha-request-curl.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
<?php
} else {
// If it's not successful, then one or more error codes will be returned.
?>
<h2>Something went wrong</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>Check the error code reference at <kbd><a href="https://developers.google.com/recaptcha/docs/verify#error-code-reference">https://developers.google.com/recaptcha/docs/verify#error-code-reference</a></kbd>.
<p><strong>Note:</strong> Error code <kbd>missing-input-response</kbd> may mean the user just didn't complete the reCAPTCHA.</p>
<p><a href="/recaptcha-request-curl.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
Expand Down
6 changes: 3 additions & 3 deletions examples/recaptcha-request-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@
// In production, *always* sanitise and validate your input'
?>
<h2><kbd>POST</kbd> data</h2>
<kbd><pre><?php var_export($_POST); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($_POST, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<?php
// If the form submission includes the "g-captcha-response" field
// Create an instance of the service using your secret and the Post request method.
Expand All @@ -110,15 +110,15 @@
// If the response is a success, that's it!
?>
<h2>Success!</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>That's it. Everything is working. Go integrate this into your real project.</p>
<p><a href="/recaptcha-request-post.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
<?php
} else {
// If it's not successful, then one or more error codes will be returned.
?>
<h2>Something went wrong</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>Check the error code reference at <kbd><a href="https://developers.google.com/recaptcha/docs/verify#error-code-reference">https://developers.google.com/recaptcha/docs/verify#error-code-reference</a></kbd>.
<p><strong>Note:</strong> Error code <kbd>missing-input-response</kbd> may mean the user just didn't complete the reCAPTCHA.</p>
<p><a href="/recaptcha-request-post.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
Expand Down
6 changes: 3 additions & 3 deletions examples/recaptcha-request-socket.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
// In production, *always* sanitise and validate your input'
?>
<h2><kbd>POST</kbd> data</h2>
<kbd><pre><?php var_export($_POST); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($_POST, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<?php
// If the form submission includes the "g-captcha-response" field
// Create an instance of the service using your secret and the SocketPost request method.
Expand All @@ -109,15 +109,15 @@
// If the response is a success, that's it!
?>
<h2>Success!</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>That's it. Everything is working. Go integrate this into your real project.</p>
<p><a href="/recaptcha-request-socket.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
<?php
} else {
// If it's not successful, then one or more error codes will be returned.
?>
<h2>Something went wrong</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>Check the error code reference at <kbd><a href="https://developers.google.com/recaptcha/docs/verify#error-code-reference">https://developers.google.com/recaptcha/docs/verify#error-code-reference</a></kbd>.
<p><strong>Note:</strong> Error code <kbd>missing-input-response</kbd> may mean the user just didn't complete the reCAPTCHA.</p>
<p><a href="/recaptcha-request-socket.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
Expand Down
6 changes: 3 additions & 3 deletions examples/recaptcha-v2-checkbox-explicit.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
// In production, *always* sanitise and validate your input'
?>
<h2><kbd>POST</kbd> data</h2>
<kbd><pre><?php var_export($_POST); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($_POST, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<?php
// If the form submission includes the "g-captcha-response" field
// Create an instance of the service using your secret
Expand Down Expand Up @@ -113,15 +113,15 @@
// If the response is a success, that's it!
?>
<h2>Success!</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>That's it. Everything is working. Go integrate this into your real project.</p>
<p><a href="/recaptcha-v2-checkbox-explicit.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
<?php
} else {
// If it's not successful, then one or more error codes will be returned.
?>
<h2>Something went wrong</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>Check the error code reference at <kbd><a href="https://developers.google.com/recaptcha/docs/verify#error-code-reference">https://developers.google.com/recaptcha/docs/verify#error-code-reference</a></kbd>.
<p><strong>Note:</strong> Error code <kbd>missing-input-response</kbd> may mean the user just didn't complete the reCAPTCHA.</p>
<p><a href="/recaptcha-v2-checkbox-explicit.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
Expand Down
6 changes: 3 additions & 3 deletions examples/recaptcha-v2-checkbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
// In production, *always* sanitise and validate your input'
?>
<h2><kbd>POST</kbd> data</h2>
<kbd><pre><?php var_export($_POST); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($_POST, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<?php
// If the form submission includes the "g-captcha-response" field
// Create an instance of the service using your secret
Expand Down Expand Up @@ -113,15 +113,15 @@
// If the response is a success, that's it!
?>
<h2>Success!</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>That's it. Everything is working. Go integrate this into your real project.</p>
<p><a href="/recaptcha-v2-checkbox.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
<?php
} else {
// If it's not successful, then one or more error codes will be returned.
?>
<h2>Something went wrong</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>Check the error code reference at <kbd><a href="https://developers.google.com/recaptcha/docs/verify#error-code-reference">https://developers.google.com/recaptcha/docs/verify#error-code-reference</a></kbd>.
<p><strong>Note:</strong> Error code <kbd>missing-input-response</kbd> may mean the user just didn't complete the reCAPTCHA.</p>
<p><a href="/recaptcha-v2-checkbox.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
Expand Down
6 changes: 3 additions & 3 deletions examples/recaptcha-v2-invisible.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
// In production, *always* sanitise and validate your input'
?>
<h2><kbd>POST</kbd> data</h2>
<kbd><pre><?php var_export($_POST); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($_POST, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<?php
// If the form submission includes the "g-captcha-response" field
// Create an instance of the service using your secret
Expand Down Expand Up @@ -113,15 +113,15 @@
// If the response is a success, that's it!
?>
<h2>Success!</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>That's it. Everything is working. Go integrate this into your real project.</p>
<p><a href="/recaptcha-v2-invisible.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
<?php
} else {
// If it's not successful, then one or more error codes will be returned.
?>
<h2>Something went wrong</h2>
<kbd><pre><?php var_export($resp); ?></pre></kbd>
<kbd><pre><?php echo htmlspecialchars(print_r($resp, true), ENT_QUOTES | ENT_HTML5, 'UTF-8'); ?></pre></kbd>
<p>Check the error code reference at <kbd><a href="https://developers.google.com/recaptcha/docs/verify#error-code-reference">https://developers.google.com/recaptcha/docs/verify#error-code-reference</a></kbd>.
<p><strong>Note:</strong> Error code <kbd>missing-input-response</kbd> may mean the user just didn't complete the reCAPTCHA.</p>
<p><a href="/recaptcha-v2-invisible.php"><span aria-hidden="true">⤴️</span> Try again</a></p>
Expand Down