这是我的代码我目前的工作。但我只需要点击重定向到下一个页面重定向后succesfull谷歌recapta
<title></title>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<form method="post" action="index.php">
<div class="g-recaptcha" data-sitekey="xxxxx"></div>
<input type="submit" />
</form>
</body>
<?php
if($_SERVER["REQUEST_METHOD"] === "POST")
{
//form submitted
//check if other form details are correct
//verify captcha
$recaptcha_secret = "xxxxxxxxxg";
$response = file_get_contents("https://www.google.com/recaptcha/api/siteverify?secret=".$recaptcha_secret."&response=".$_POST['g-recaptcha-response']);
$response = json_decode($response, true);
if($response["success"] === true)
{
echo "Logged In Successfully";
}
else
{
echo "You are a robot";
}
}
?>
好的,这很好,所以从我们你要什么? – nogad
@Irfan Ali为什么不张贴您的代码,因为我们在这里通过解决问题来帮助您解决问题,而不是为您编写整个代码......请花几分钟时间发布您的代码并将其添加到您的代码中点击“编辑”链接提问?换上别的,因为这应该保密的,应该由你只知道一些秘密/私有密钥。 – jagb
@jabg我没有它查收 –