2020-12-30 23:33:07 +01:00
|
|
|
<?php
|
2021-04-12 20:43:43 +02:00
|
|
|
include("./lib/config.php");
|
2020-12-30 23:33:07 +01:00
|
|
|
$data = array(
|
|
|
|
'secret' => $secretkey,
|
|
|
|
'response' => $_POST['h-captcha-response']
|
|
|
|
);
|
|
|
|
|
|
|
|
$verify = curl_init();
|
|
|
|
curl_setopt($verify, CURLOPT_URL, "https://hcaptcha.com/siteverify");
|
|
|
|
curl_setopt($verify, CURLOPT_POST, true);
|
|
|
|
curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
|
|
|
|
curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
$response_ = curl_exec($verify);
|
|
|
|
$responseData = json_decode($response_);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($responseData->success) {
|
|
|
|
echo("$contactmail");
|
|
|
|
} else {
|
|
|
|
echo("Failed to verify Captcha");
|
|
|
|
}
|