Last active
June 4, 2020 11:55
-
-
Save Maxim-Kolmogorov/75a50a5319471813f6c6cecae4cc4ce7 to your computer and use it in GitHub Desktop.
Setting a secret key for an article: https://kolmogorov.pro/integration_google_recaptcha_v3_in_site_on_vue_js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ($_SERVER["REQUEST_METHOD"] == "POST") { | |
session_start(); | |
$_POST = json_decode(file_get_contents('php://input'), true); | |
$_SESSION['recaptcha_token'] = $_POST['token']; | |
} else { | |
http_response_code(404); | |
header('Location: /404.html'); | |
exit; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment