0
I want to do the same as this site, add a link and only go through it if you check in recaptcha.
https://www.androidtunado.com.br/p/pagina-de-download_987.html?
Then, after you do the recaptcha check, that, error happens. I added site key and secret key as the code below. What I don’t know is to add the link reference.
Error occurred:
method not allowed Error 405
I tried it a code that a young man created, I saw another question similar to mine but it wasn’t about link anyone can help me, please? I really needed to fix this.
Where I tested it: https://www.euhtmods.com/p/pagina-de-download_19.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Conteudo a ser Bloqueado</title>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<h1>
Exemplo</h1>
<?php
$resposta = false;
if (isset($_POST['g-recaptcha-response']) && !empty($_POST['g-recaptcha-response'])) {
$captcha_data = $_POST['g-recaptcha-response'];
$chave_secreta = "CHAVE-SECRETA";
$resposta = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=$chave_secreta&response=$captcha_data&remoteip=".$_SERVER['REMOTE_ADDR']);
}
if ($resposta) {
?>
<p>
Por favor, verifique a caixa de captcha para prosseguir para a página de destino!</p>
<?php
}
?>
<?php
if(!$resposta){
?>
<form method="post" onsubmit="return validar()">
<div class="g-recaptcha" data-callback="recaptchaCallback" data-sitekey="CHAVE-DE-SITE">
</div>
<button type="submit" class="button">Prosseguir para o Download</button>
</form>
<script>
googlerecpchk = false;
function recaptchaCallback() {
googlerecpchk = true;
};
function validar(){
console.log(googlerecpchk);
if(!googlerecpchk){
alert("Por favor, verifique a caixa de captcha para prosseguir para a página de destino!");
return false;
}
}
</script>
<?php
}
?>
</body>
</html>
watch this video https://www.youtube.com/watch?v=AuWsUDaOQdM
– user148170
configured this error when adding a link that I don’t know how to solve unfortunately
– Matheus