EU CAPTCHA for PHP
PHP is a widely-used open-source server-side scripting language designed for web development and easily embedded into HTML for building dynamic websites and applications. Protect any PHP application from bots and form spam with a privacy-first, EU-hosted CAPTCHA compatible with all major frameworks.
Why choose Myra EU CAPTCHA?
Interaction-free user experience
No puzzles, no clicks – invisible bot protection with zero user friction.
Digital sovereignty made in Germany
Fully GDPR-compliant, no cookies, no tracking – developed and hosted in Germany.
Intelligent threat detection
Smart protection trained by more than 100 billion daily Myra CDN signals.
Proven technology
Over 5 billion successfully secured authentication attempts.
How the integration works
1. Create an EU CAPTCHA account
Creating an account is completely free, all you need is a valid email address and you’re ready to go. Choose a plan that covers your needs. The first 3 months are free of charge.
Create an Account2. Create a sitekey
Create a sitekey in the EU CAPTCHA dashboard for the domain you want to protect. Provide a clear label so you can easily identify it later. This sitekey links the widget on your PHP application to your EU CAPTCHA account.
3. Add EU CAPTCHA to your form
Load verify.js and place the EU CAPTCHA widget div with your sitekey inside any HTML form you want to protect — the response token is automatically included on submission.
View HTML integration guide4. Verify the token in your PHP backend
In your PHP form handler, retrieve the eu-captcha-response token from POST data and validate it against the EU CAPTCHA API before processing any submission.
View PHP verification guide
5. The EU CAPTCHA widget will appear on your form.
Frequently Asked Questions
How do I verify a CAPTCHA token in PHP?
Install the EU CAPTCHA PHP client via Composer. In your form handler, read the eu-captcha-response value from $_POST, then call the client's verification method with your secret key and the token. The client sends a POST request to the EU CAPTCHA API and returns a result that tells you whether the submission is from a human or a bot.
Is there an official PHP module for EU CAPTCHA?
Yes. EU CAPTCHA provides an official PHP client library available via Composer. It supports PHP 7.4 and later and works with raw PHP, Laravel, Symfony, and any other PHP framework. The module abstracts the API call, handles authentication, and parses the JSON response from the verification endpoint.
Does EU CAPTCHA work with any PHP framework?
Yes. The EU CAPTCHA PHP module is framework-agnostic. It works with raw PHP, Laravel, Symfony, Slim, CodeIgniter, and any other PHP framework. The verification logic is a single method call that you can integrate into controllers, middleware, service classes, or any other part of your application's request handling pipeline.
How do I add EU CAPTCHA to a PHP contact form?
Add the verify.js script tag to your HTML form template and place the EU CAPTCHA widget div with your sitekey inside the form. In your PHP handler that processes the form POST, read $_POST['eu-captcha-response'], verify it using the EU CAPTCHA PHP client with your secret key, and only send the contact email or store the data if verification succeeds.
How do I install the EU CAPTCHA PHP client via Composer?
Run composer require eu-captcha/php-client in your project directory. Then configure the client by instantiating it with your secret key, which you should store as an environment variable rather than hardcoding it. The package is available on Packagist and is compatible with standard Composer autoloading.
How do I handle CAPTCHA verification failure in PHP?
If the EU CAPTCHA client returns a failed verification result, redirect the user back to the form with an error message, or return a JSON error response if you are handling an AJAX form. Do not process the submitted data — bot submissions that fail verification should be silently discarded or logged for monitoring purposes.
Is EU CAPTCHA GDPR compliant for PHP websites?
Yes. EU CAPTCHA is operated by an EU-based company, is hosted entirely in Germany, and does not rely on US cloud providers or infrastructure subject to US surveillance laws. The service processes only the data necessary to provide and verify the CAPTCHA (such as IP address and technical browser or device information) in line with the requirements of the GDPR. Your organization remains responsible for providing transparent privacy information, selecting an appropriate legal basis, and obtaining any required consent for your specific PHP implementation. This information does not constitute legal advice; please consult your legal counsel for an assessment of your individual case.
Ready for a better CAPTCHA?
Experience invisible bot protection with privacy‑first, GDPR‑compliant verification made and hosted in Germany. Try Myra EU CAPTCHA now 3 months for free and secure your web forms without adding friction for your users.
Privacy-first technology
We guarantee zero data transfer to third-country jurisdictions.
Read our privacy policyFast and easy setup
We offer ready-made integrations for many CMS and popular frameworks.
Read our quick start guide