Sitemde ve recaptcha_challenge_field üzerinde Recaptcha kullanmaya çalışıyorum, ve recaptcha_response_field backend $ _POST dizi eklenmektedir değil - ama benim form değişkenlerin kalanı vardır.
Herhangi bir fikir? Ben çift özel / kamu anahtarlarını kontrol ettirin.
Burada oluşturulan HTML:
<form action='myform.php' name='myform' id='myform' method='post' enctype='multipart/form-data'>
<tr class='select'>
<td class='label'>Name:</td>
<td>
<input type='text' name='name' id='name' class='inputtext' maxlength='25' size='25' >
</td>
</tr>
<tr class='select'>
<td class='label'>Email:</td>
<td>
<input type='text' name='email' id='email' class='inputtext' maxlength='25' size='25' >
</td>
</tr>
<tr class='select'>
<td class='label'>Message:</td>
<td>
<textarea class='inputtext' name='message' rows='10' cols='45'></textarea>
</td>
</tr>
<tr class='select'>
<td class='label'>Are you human?</td>
<td>
<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=MY_KEY"></script>
<noscript>
<iframe src="http://api.recaptcha.net/noscript?k=MY_KEY" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" value="manual_challenge"/>
</noscript>
</td>
</tr>
<tr>
<td>
</td>
<td style='text-align: left;' colspan='2'>
<input type='submit' class='button' value='Send message'>
</td>
</tr>
</form>
İşte benim işleyicisi şimdiye kadar:
print_r($_POST);
require_once('inc/recaptchalib.php');
$privatekey = "MY_PRIVATE_KEY";
$resp = recaptcha_check_answer ($privatekey,
$_SERVER["REMOTE_ADDR"],
$_POST["recaptcha_challenge_field"],
$_POST["recaptcha_response_field"]);
print_r($resp);
if (!$resp->is_valid) {
die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
"(reCAPTCHA said: " . $resp->error . ")");
}
Any help would be really appreciated. Thank you,