Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]

Modules

ADT
Database
GTK2
GUI
IP
PiJAX
Public
Sql
Stdio
Subversion
System
Tools
Xosd
lua
v4l2
wx

Recent Changes

Public.Parser.XML2 1.50
Public.ZeroMQ 1.1
Public.Template.Mustache 1.0
Public.Protocols.XMPP 1.4
Sql.Provider.jdbc 1.0

Popular Downloads

Public.Parser.JSON2 1.0
Public.Parser.JSON 0.2
GTK2 2.23
Public.Web.FCGI 1.8
Public.Parser.XML2 1.48


Pike Module Reference:

module version 0.1, prepared

  MODULE Public
Modules
Web

  MODULE Public.Web
Modules
reCAPTCHA

  MODULE Public.Web.reCAPTCHA
Classes
Client


Import

  CLASS Public.Web.reCAPTCHA.Client
Methods
get_js()
verify()
Description

Create a reCAPTCHA client instance for a specific public/private keypair. The client object may then be used to verify captchas and generate the html to be included into your website.

Visit http://www.recaptcha.org for information about reCAPTCHA.


syntax

string Public.Web.reCAPTCHA.Client()->private_key
string Public.Web.reCAPTCHA.Client()->public_key
void Public.Web.reCAPTCHA.Client()->create(string private_key, string public_key)


Variable session

object(Session) Public.Web.reCAPTCHA.Client()->session

Description

Protocols.HTTP.Session object used internally.


Method verify

void Public.Web.reCAPTCHA.Client()->verify(string remote_ip, string challenge, string response, function callback)

Description

Verifys a captcha. callback is called with either just 1 if the captcha was entered correctly or 0 as the first and an error code as the second argument. Check http://recaptcha.net/apidocs/captcha/ for an explanation for what those error codes mean.

Parameter remote_ip

The ip adress of the user that entered the captcha.

Parameter challenge

The value of the recaptcha_challenge_field field.

Parameter response

The value of the recaptcha_response_field field.

Parameter callback

To be called on success/failure.


Method get_js

string Public.Web.reCAPTCHA.Client()->get_js(string|void error_code)

Description

Generate html that shows the captcha to be included into the website. The html is generated according to the API specifications at http://recaptcha.net/apidocs/captcha/client.html.

Parameter error_code

Optional argument to include error messages into the captcha field. Use the error returned by the verify callback of the users last try.

gotpike.org | Copyright © 2004 - 2019 | Pike is a trademark of Department of Computer and Information Science, Linköping University