MI update

This commit is contained in:
JoseluCross
2018-09-30 10:39:03 +02:00
parent aaa9a83eb2
commit c7ede8cb6e
2 changed files with 20 additions and 1 deletions

View File

@@ -77,4 +77,19 @@ function groupByCategory(&$supported){
array_push($grouped[$val[1]][0],[$key,$val[0]]);
}
return $grouped;
}
function checkCaptcha($response){
$url = "https://www.google.com/recaptcha/api/siteverify";
$post = 'secret='.'6Lc7gXAUAAAAAOTbo2u3IXoSB6KlhtVmUHTzpcGY&response='. $response;
$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $post);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec( $ch );
return json_decode($response)["success"];
}