$key, 'response' => urlencode($response), 'remoteip' => urlencode($_SERVER['REMOTE_ADDR']) ); $opt = array( 'http' => array( 'header' => "Content-type: application/x-www-form-urlencoded\r\n", 'method' => 'POST', 'content' => http_build_query($dat) ) ); $context = stream_context_create($opt); $result = file_get_contents($url, false, $context); return json_decode($result)->success; } catch (Exception $e) { return null; } } function recaptcha_get_html($pubKey){ return "
"; } ?>