XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
recaptchalib.php File Reference

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"
 

Function Documentation

_recaptcha_aes_encrypt (   $val,
  $ky 
)

Definition at line 214 of file recaptchalib.php.

References _recaptcha_aes_pad().

Referenced by recaptcha_mailhide_url().

Here is the call graph for this function:

Here is the caller graph for this function:

_recaptcha_aes_pad (   $val)

Definition at line 206 of file recaptchalib.php.

Referenced by _recaptcha_aes_encrypt().

Here is the caller graph for this function:

_recaptcha_http_post (   $host,
  $path,
  $data,
  $port = 80 
)

Submits an HTTP POST to a reCAPTCHA server

Parameters
string$host
string$path
array$data
intport
Returns
array response

Definition at line 67 of file recaptchalib.php.

References $response, and _recaptcha_qsencode().

Referenced by recaptcha_check_answer().

Here is the call graph for this function:

Here is the caller graph for this function:

_recaptcha_mailhide_email_parts (   $email)

Definition at line 248 of file recaptchalib.php.

References $email.

Referenced by recaptcha_mailhide_html().

Here is the caller graph for this function:

_recaptcha_mailhide_urlbase64 (   $x)

Definition at line 225 of file recaptchalib.php.

Referenced by recaptcha_mailhide_url().

Here is the caller graph for this function:

_recaptcha_qsencode (   $data)

Encodes the given data into a query string format

Parameters
$data- array of string elements to be encoded
Returns
string - encoded request

Definition at line 47 of file recaptchalib.php.

Referenced by _recaptcha_http_post(), and recaptcha_get_signup_url().

Here is the caller graph for this function:

recaptcha_check_answer (   $privkey,
  $remoteip,
  $challenge,
  $response,
  $extra_params = array() 
)

Calls an HTTP POST function to verify if the user's guess was correct

Parameters
string$privkey
string$remoteip
string$challenge
string$response
array$extra_paramsan array of extra variables to post to the server
Returns
ReCaptchaResponse

Definition at line 152 of file recaptchalib.php.

References $response, _recaptcha_http_post(), and RECAPTCHA_VERIFY_SERVER.

Referenced by XoopsCaptchaRecaptcha\verify().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
string$pubkeyA public key for reCAPTCHA
string$errorThe error given by reCAPTCHA (optional, default is null)
boolean$use_sslShould the request be made over ssl? (optional, default is false)
Returns
string - The HTML to be embedded in the user's form.

Definition at line 106 of file recaptchalib.php.

References $error, RECAPTCHA_API_SECURE_SERVER, and RECAPTCHA_API_SERVER.

Referenced by XoopsCaptchaRecaptcha\render().

Here is the caller graph for this function:

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.

Parameters
string$domainThe domain where the page is hosted
string$appnameThe name of your application

Definition at line 202 of file recaptchalib.php.

References _recaptcha_qsencode().

Here is the call graph for this function:

recaptcha_mailhide_html (   $pubkey,
  $privkey,
  $email 
)

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

Definition at line 267 of file recaptchalib.php.

References $email, $url, _recaptcha_mailhide_email_parts(), and recaptcha_mailhide_url().

Here is the call graph for this function:

recaptcha_mailhide_url (   $pubkey,
  $privkey,
  $email 
)

Definition at line 230 of file recaptchalib.php.

References $email, _recaptcha_aes_encrypt(), and _recaptcha_mailhide_urlbase64().

Referenced by recaptcha_mailhide_html().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

const RECAPTCHA_API_SECURE_SERVER "https://www.google.com/recaptcha/api"

Definition at line 39 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 38 of file recaptchalib.php.

Referenced by recaptcha_get_html().

const RECAPTCHA_VERIFY_SERVER "www.google.com"

Definition at line 40 of file recaptchalib.php.

Referenced by recaptcha_check_answer().