Php 如何放置reCAPTCHA
这是我的登记表。如果要在其中添加reCAPTCHA表单,该怎么办Php 如何放置reCAPTCHA,php,recaptcha,Php,Recaptcha,这是我的登记表。如果要在其中添加reCAPTCHA表单,该怎么办 <form method="post" action="doregister.php" id="register"> 登记册 <div> <label for="username">Username</label><br/> <input type="text" id="username" name="username" required="requi
<form method="post" action="doregister.php" id="register">
登记册
<div>
<label for="username">Username</label><br/>
<input type="text" id="username" name="username" required="required" placeholder="Username"align="right" width="48" height="48"/>
</div> <br/>
<div>
<label for="password">Password</label><br/>
<input type="password" id="password" name="password" required="required" placeholder="Password"/>
</div> <br/>
<br/>
<br/>
<input type="submit" id ="btnSubmit" value="Register"/>
用户名
密码
developers.google.com提供了关于如何将recaptcha与php结合使用的非常好的文档:
可能的解决方案是使用任何可用的php库。这里有一个名为的友好API,其中包含一个php脚本,很少有类可用于生成验证码图像并验证它们。验证输入的示例代码
include_once 'securimage.php';
$securimage = new Securimage();
if ($securimage->check($_POST['captcha_code']) == false) {
echo "The security code entered was incorrect.<br /><br />";
echo "Please go <a href='javascript:history.go(-1)'>back</a> and try again.";
exit;
}
include_once'securimage.php';
$securimage=新的securimage();
if($securimage->check($\u POST['captcha\u code'])==false){
echo“输入的安全代码不正确。
”;
echo“请再试一次。”;
出口
}
这是您可以在提交按钮上方添加的内容。我想问一下……如何……=。=~~阅读验证码文档并这样做