Skip to content

Instantly share code, notes, and snippets.

@Maxim-Kolmogorov
Last active June 4, 2020 11:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Maxim-Kolmogorov/75a50a5319471813f6c6cecae4cc4ce7 to your computer and use it in GitHub Desktop.
Save Maxim-Kolmogorov/75a50a5319471813f6c6cecae4cc4ce7 to your computer and use it in GitHub Desktop.
<?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