C3rd
ReCaptcha and SAJAX Integration
Posted: 18 Apr 2012, 18:17pm - WednesdayIt's been a while using this method and I'm posting this since my friends are asking how to integrate the Recaptcha and SAJAX. What to edit:
- Edit recaptchalib.php (ReCaptcha Library File), at line 106 or under recaptcha_get_html() function, add "id" attributes of both recaptcha_challenge_field and recaptcha_response_field.
function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false)
{
if ($pubkey == null || $pubkey == '') {
die ("To use reCAPTCHA you must get an API key from <a href='https://www.google.com/recaptcha/admin/create'>https://www.google.com/recaptcha/admin/create</a>");
}
if ($use_ssl) {
$server = RECAPTCHA_API_SECURE_SERVER;
} else {
$server = RECAPTCHA_API_SERVER;
}
$errorpart = "";
if ($error) {
$errorpart = "&error=" . $error;
}
return '<script type="text/javascript" src="'. $server . '/challenge?k=' . $pubkey . $errorpart . '&hl=en"></script>
<noscript>
<iframe src="'. $server . '/noscript?k=' . $pubkey . $errorpart . '" height="300" width="500" frameborder="0"></iframe><br/>
<textarea name="recaptcha_challenge_field" id="recaptcha_challenge_field" rows="3" cols="40"></textarea>
<input type="hidden" name="recaptcha_response_field" id="recaptcha_response_field" value="manual_challenge"/>
</noscript>';
}
Source Code: recaptcha_sajax.zip
Search
Categories
Related Links
- Apache Web Server
- ASP Immigration Services Ltd.
- CentOS Linux
- Color Scheme Picker
- CSS Button Generator
- Deviant Art Account
- Don Tabaniag - GraphiCult
- Jerson Maglasang Weblog
- Joshua Manlunas
- Mark "mungkey" Vicente
- Matt Arnilo Baluyos
- MySQL
- Paul Labis
- PHP
- PrendStar
- Ridvan Baluyos
- Scott Davies
- SEO Fart XML-RPC Ping Tool
- Stripes Generator
- The Hero
- Ubuntu Linux
- Vim Carlo Nabora (DA)
- Wella Maria Hong
- What is my IP?
- Xavier University - Ateneo de Cagayan
- Zabyer Community