PHP code example of denismitr / easy-curl
1. Go to this page and download the library: Download denismitr/easy-curl library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
denismitr / easy-curl example snippets
$captchaResponse = EasyCurl::post(config('services.recaptcha.url'))
->send([
'secret' => config('services.recaptcha.secret'),
'response' => $request->input('g-recaptcha-response'),
'remoteip' => $request->ip()
])
->getDecodedResponse();
if ( ! isset($captchaResponse->success) || ! $captchaResponse->success) {
abort(400, 'Нет, нет, нет!');
}