XOOPS
2.6.0
|
Go to the source code of this file.
Classes | |
class | ReCaptchaResponse |
Functions | |
_recaptcha_aes_encrypt ($val, $ky) | |
_recaptcha_aes_pad ($val) | |
_recaptcha_http_post ($host, $path, $data, $port=80) | |
_recaptcha_mailhide_email_parts ($email) | |
_recaptcha_mailhide_urlbase64 ($x) | |
_recaptcha_qsencode ($data) | |
recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params=array()) | |
recaptcha_get_html ($pubkey, $error=null, $use_ssl=false) | |
recaptcha_get_signup_url ($domain=null, $appname=null) | |
recaptcha_mailhide_html ($pubkey, $privkey, $email) | |
recaptcha_mailhide_url ($pubkey, $privkey, $email) | |
Variables | |
const | RECAPTCHA_API_SECURE_SERVER "https://www.google.com/recaptcha/api" |
const | RECAPTCHA_API_SERVER "http://www.google.com/recaptcha/api" |
const | RECAPTCHA_VERIFY_SERVER "www.google.com" |
_recaptcha_aes_encrypt | ( | $val, | |
$ky | |||
) |
Mailhide related code
$val | |
$ky |
Definition at line 228 of file recaptchalib.php.
References _recaptcha_aes_pad().
Referenced by recaptcha_mailhide_url().
_recaptcha_aes_pad | ( | $val | ) |
$val |
Definition at line 214 of file recaptchalib.php.
Referenced by _recaptcha_aes_encrypt().
_recaptcha_http_post | ( | $host, | |
$path, | |||
$data, | |||
$port = 80 |
|||
) |
Submits an HTTP POST to a reCAPTCHA server
string | $host | |
string | $path | |
array | $data | |
int | $port |
Definition at line 71 of file recaptchalib.php.
References $response, and _recaptcha_qsencode().
Referenced by recaptcha_check_answer().
_recaptcha_mailhide_email_parts | ( | ) |
Definition at line 276 of file recaptchalib.php.
References $email.
Referenced by recaptcha_mailhide_html().
_recaptcha_mailhide_urlbase64 | ( | $x | ) |
$x |
Definition at line 243 of file recaptchalib.php.
Referenced by recaptcha_mailhide_url().
_recaptcha_qsencode | ( | $data | ) |
Encodes the given data into a query string format
$data | - array of string elements to be encoded |
Definition at line 49 of file recaptchalib.php.
Referenced by _recaptcha_http_post(), and recaptcha_get_signup_url().
recaptcha_check_answer | ( | $privkey, | |
$remoteip, | |||
$challenge, | |||
$response, | |||
$extra_params = array() |
|||
) |
Calls an HTTP POST function to verify if the user's guess was correct
string | $privkey | |
string | $remoteip | |
string | $challenge | |
string | $response | |
array | $extra_params | an array of extra variables to post to the server |
Definition at line 156 of file recaptchalib.php.
References $response, _recaptcha_http_post(), and RECAPTCHA_VERIFY_SERVER.
Referenced by XoopsCaptchaRecaptcha\verify().
recaptcha_get_html | ( | $pubkey, | |
$error = null , |
|||
$use_ssl = false |
|||
) |
Gets the challenge HTML (javascript and non-javascript version). This is called from the browser, and the resulting reCAPTCHA HTML widget is embedded within the HTML form it was called from.
string | $pubkey | A public key for reCAPTCHA |
string | $error | The error given by reCAPTCHA (optional, default is null) |
boolean | $use_ssl | Should the request be made over ssl? (optional, default is false) |
Definition at line 111 of file recaptchalib.php.
References $error, RECAPTCHA_API_SECURE_SERVER, and RECAPTCHA_API_SERVER.
Referenced by XoopsCaptchaRecaptcha\render().
recaptcha_get_signup_url | ( | $domain = null , |
|
$appname = null |
|||
) |
gets a URL where the user can sign up for reCAPTCHA. If your application has a configuration page where you enter a key, you should provide a link using this function.
string | $domain | The domain where the page is hosted |
string | $appname | The name of your application |
Definition at line 204 of file recaptchalib.php.
References _recaptcha_qsencode().
recaptcha_mailhide_html | ( | $pubkey, | |
$privkey, | |||
) |
Gets html to display an email address given a public an private key. to get a key, go to:
http://www.google.com/recaptcha/mailhide/apikey
$pubkey | |
$privkey | |
Definition at line 303 of file recaptchalib.php.
References $email, $url, _recaptcha_mailhide_email_parts(), and recaptcha_mailhide_url().
recaptcha_mailhide_url | ( | $pubkey, | |
$privkey, | |||
) |
gets the reCAPTCHA Mailhide url for a given email, public key and private key
$pubkey | |
$privkey | |
Definition at line 256 of file recaptchalib.php.
References $email, _recaptcha_aes_encrypt(), and _recaptcha_mailhide_urlbase64().
Referenced by recaptcha_mailhide_html().
const RECAPTCHA_API_SECURE_SERVER "https://www.google.com/recaptcha/api" |
Definition at line 40 of file recaptchalib.php.
Referenced by recaptcha_get_html().
const RECAPTCHA_API_SERVER "http://www.google.com/recaptcha/api" |
The reCAPTCHA server URL's
Definition at line 39 of file recaptchalib.php.
Referenced by recaptcha_get_html().
const RECAPTCHA_VERIFY_SERVER "www.google.com" |
Definition at line 41 of file recaptchalib.php.
Referenced by recaptcha_check_answer().