Server-side verification for InfoPeak Captcha - the privacy-first, EU-hosted captcha. No tracking, no cookies, no image puzzles.
composer require infopeak/captchaRequires PHP 7.4+ with the curl and json extensions.
Add the widget to your form (full guide):
<form action="/signup" method="POST">
<input type="email" name="email" required>
<div class="infopeak-captcha" data-sitekey="YOUR_SITEKEY"></div>
<button type="submit">Sign up</button>
</form>
<script src="https://captcha.infopeak.io/infopeak-captcha.js" defer></script>Verify the token when the form is submitted:
use InfoPeak\Captcha\Client;
$captcha = new Client('YOUR_SITEKEY', 'YOUR_SECRET');
if (!$captcha->verify($_POST[Client::FIELD] ?? '')) {
http_response_code(400);
exit('Captcha verification failed');
}
// ... proceedNeed quota information too?
$result = $captcha->verifyDetailed($_POST[Client::FIELD] ?? '');
$result->valid; // bool - token genuine and unused
$result->overLimit; // bool - sitekey over its monthly quotaVerification fails closed: network errors and non-200 responses return valid = false.
Public test credentials that work on any domain and never count against a quota (never use in production):
sitekey: ipk_test_sitekey
secret: ipk_test_secret
- Get a free sitekey - 10,000 verifications/month at no cost
- Developer documentation
MIT