I remade reCAPTCHA PHP Client my own way

Image for post
Image for post
Photo by Franck V. on Unsplash

HTTP/2 and PSR-18

Image for post
Image for post
Why do you do this?

Easy to work with

$isValid = ReCaptcha::validate($secret, $token, $ip);
$response = ReCaptcha::make($secret)
->threshold(0.7)
->action('login')
->verify($token, $ip);

Comes with an Exception

$response = ReCaptcha::make($secret)->verifyOrThrow($token, $ip);

Easy errors

$response = ReCaptcha::make($secret)->verify($token, $ip)var_dump($response->error_codes);
// array(1) {
// [0] => string(10) "unknown-error"
// }

Graphic Designer graduate. Full Stack Web Developer. Retired Tech & Gaming Editor.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store