Moodle  2.2.1
http://www.collinsharper.com
C:/xampp/htdocs/moodle/lib/recaptchalib.php File Reference

Go to the source code of this file.

Data Structures

class  ReCaptchaResponse

Namespaces

namespace  moodlecore

Enumerations

enum  RECAPTCHA_API_SERVER
enum  RECAPTCHA_API_SECURE_SERVER
enum  RECAPTCHA_VERIFY_SERVER

Functions

 _recaptcha_qsencode ($data)
 _recaptcha_http_post ($host, $path, $data, $port=80, $https=false)
 recaptcha_get_html ($pubkey, $error=null, $use_ssl=false)
 recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $https=false)
 recaptcha_get_signup_url ($domain=null, $appname=null)
 _recaptcha_aes_pad ($val)
 _recaptcha_aes_encrypt ($val, $ky)
 _recaptcha_mailhide_urlbase64 ($x)
 recaptcha_mailhide_url ($pubkey, $privkey, $email)
 _recaptcha_mailhide_email_parts ($email)
 recaptcha_mailhide_html ($pubkey, $privkey, $email)

Enumeration Type Documentation

Definition at line 43 of file recaptchalib.php.

The reCAPTCHA server URL's

Definition at line 42 of file recaptchalib.php.

Definition at line 44 of file recaptchalib.php.


Function Documentation

_recaptcha_aes_encrypt ( val,
ky 
)

Definition at line 265 of file recaptchalib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_recaptcha_aes_pad ( val)

Definition at line 257 of file recaptchalib.php.

Here is the caller graph for this function:

_recaptcha_http_post ( host,
path,
data,
port = 80,
https = false 
)

Submits an HTTP POST to a reCAPTCHA server

object

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

Definition at line 73 of file recaptchalib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 299 of file recaptchalib.php.

Here is the caller graph for this function:

Definition at line 276 of file recaptchalib.php.

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 51 of file recaptchalib.php.

Here is the caller graph for this function:

recaptcha_check_answer ( privkey,
remoteip,
challenge,
response,
https = false 
)

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

Parameters:
string$privkey
string$remoteip
string$challenge
string$response
Returns:
ReCaptchaResponse

Definition at line 204 of file recaptchalib.php.

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.

object

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 113 of file recaptchalib.php.

Here is the call graph for this function:

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 253 of file recaptchalib.php.

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 318 of file recaptchalib.php.

Here is the call graph for this function:

recaptcha_mailhide_url ( pubkey,
privkey,
email 
)

Definition at line 281 of file recaptchalib.php.

Here is the call graph for this function:

Here is the caller graph for this function:

 All Data Structures Namespaces Files Functions Variables Enumerations