[ class tree: core ] [ index: core ] [ all elements ]

Procedural File: recaptchalib.php

Source Location: /zp-extensions/captcha/reCaptcha/recaptchalib.php

Page Details
Classes
Class Description
ReCaptchaResponse A ReCaptchaResponse is returned from recaptcha_check_answer()
Constants
RECAPTCHA_API_SECURE_SERVER  [line 39]

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

[ Top ]

RECAPTCHA_API_SERVER  [line 38]

RECAPTCHA_API_SERVER = "http://www.google.com/recaptcha/api"

The reCAPTCHA server URL's


[ Top ]

RECAPTCHA_VERIFY_SERVER  [line 40]

RECAPTCHA_VERIFY_SERVER = "www.google.com"

[ Top ]


Functions
recaptcha_check_answer  [line 152]

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_params:  an array of extra variables to post to the server


ReCaptchaResponse recaptcha_check_answer( string $privkey, string $remoteip, string $challenge, string $response, [array $extra_params = array()]  )

[ Top ]
recaptcha_get_html  [line 106]

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   $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)

API Tags:
Return:  - The HTML to be embedded in the user's form.


string recaptcha_get_html( string $pubkey, [string $error = null], [boolean $use_ssl = false]  )

[ Top ]
recaptcha_get_signup_url  [line 202]

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   $domain:  The domain where the page is hosted
string   $appname:  The name of your application


void recaptcha_get_signup_url( [string $domain = null], [string $appname = null]  )

[ Top ]
recaptcha_mailhide_html  [line 267]

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

Parameters:
   $pubkey: 
   $privkey: 
   $email: 


void recaptcha_mailhide_html( $pubkey, $privkey, $email  )

[ Top ]
recaptcha_mailhide_url  [line 230]
Parameters:
   $pubkey: 
   $privkey: 
   $email: 


void recaptcha_mailhide_url( $pubkey, $privkey, $email  )

[ Top ]
_recaptcha_aes_encrypt  [line 214]
Parameters:
   $val: 
   $ky: 


void _recaptcha_aes_encrypt( $val, $ky  )

[ Top ]
_recaptcha_aes_pad  [line 206]
Parameters:
   $val: 


void _recaptcha_aes_pad( $val  )

[ Top ]
_recaptcha_http_post  [line 67]

Submits an HTTP POST to a reCAPTCHA server

Parameters:
string   $host: 
string   $path: 
array   $data: 
int   $port:  port

API Tags:
Return:  response


array _recaptcha_http_post( string $host, string $path, array $data, [int $port = 80]  )

[ Top ]
_recaptcha_mailhide_email_parts  [line 248]

gets the parts of the email to expose to the user.

eg, given johndoe@example,com return ["john", "example.com"]. the email is then displayed as john...@example.com

Parameters:
   $email: 


void _recaptcha_mailhide_email_parts( $email  )

[ Top ]
_recaptcha_mailhide_urlbase64  [line 225]
Parameters:
   $x: 


void _recaptcha_mailhide_urlbase64( $x  )

[ Top ]
_recaptcha_qsencode  [line 47]

Encodes the given data into a query string format

Parameters:
$data   $data:  - array of string elements to be encoded

API Tags:
Return:  - encoded request


string _recaptcha_qsencode( $data $data  )

[ Top ]


Documentation generated on Tue, 20 Dec 2011 16:07:59 +0100 by phpDocumentor 1.4.3