From bfdf5971495938925ee959e5cc5d3d481a236cf8 Mon Sep 17 00:00:00 2001 From: Aleksey Korzun Date: Sun, 16 Jun 2013 23:29:31 -0400 Subject: [PATCH 1/2] Updating documentation and adding proper version number for Readme --- Documentation/classes.svg | 55 --- Documentation/classes/Captcha.Captcha.html | 384 ------------------ Documentation/classes/Captcha.Exception.html | 122 ------ Documentation/classes/Captcha.Response.html | 208 ---------- Documentation/deprecated.html | 71 ---- Documentation/errors.html | 127 ------ Documentation/graph_class.html | 68 ---- Documentation/index.html | 88 ---- Documentation/markers.html | 73 ---- Documentation/namespaces/Captcha.html | 106 ----- Documentation/packages/Default.html | 71 ---- Documentation/packages/library.html | 119 ------ Documentation/packages/library.reCaptcha.html | 104 ----- Documentation/structure.xml | 177 +++----- README.md | 2 +- 15 files changed, 63 insertions(+), 1712 deletions(-) delete mode 100644 Documentation/classes.svg delete mode 100644 Documentation/classes/Captcha.Captcha.html delete mode 100644 Documentation/classes/Captcha.Exception.html delete mode 100644 Documentation/classes/Captcha.Response.html delete mode 100644 Documentation/deprecated.html delete mode 100644 Documentation/errors.html delete mode 100644 Documentation/graph_class.html delete mode 100644 Documentation/index.html delete mode 100644 Documentation/markers.html delete mode 100644 Documentation/namespaces/Captcha.html delete mode 100644 Documentation/packages/Default.html delete mode 100644 Documentation/packages/library.html delete mode 100644 Documentation/packages/library.reCaptcha.html diff --git a/Documentation/classes.svg b/Documentation/classes.svg deleted file mode 100644 index 40f2b88..0000000 --- a/Documentation/classes.svg +++ /dev/null @@ -1,55 +0,0 @@ - - - - - - -G - -cluster_Captcha - - - - - - - - -Captcha - - -\\Captcha\\Captcha - - -Captcha - - - -\\Captcha\\Exception - - -Exception - - - -\\Exception - -\Exception - - -\\Captcha\\Exception->\\Exception - - - - -\\Captcha\\Response - - -Response - - - - diff --git a/Documentation/classes/Captcha.Captcha.html b/Documentation/classes/Captcha.Captcha.html deleted file mode 100644 index a3ffe77..0000000 --- a/Documentation/classes/Captcha.Captcha.html +++ /dev/null @@ -1,384 +0,0 @@ - - - - - -phpDocumentor » \Captcha\Captcha - - - - - - - - - - -
- -
- -
- -
-

Copyright (c) 2012, Aleksey Korzun -All rights reserved.

-
-

Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met:

- -
    -
  1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer.
  2. -
  3. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution.
  4. -
- -

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

- -

The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project.

- -

Proper library for reCaptcha service

- - - - - - - - - - - - - -
authorAleksey Korzun
\Captcha\Exception
packagelibrary
-

- Methods

-
-

Checks and validates user's response

-
check(string $captcha_challenge, string $captcha_response) : \Captcha\Response
-
-
-
-

Parameters

-
-

$captcha_challenge

-string

Optional challenge string. If empty, value from $_POST will be used

-
-
-

$captcha_response

-string

Optional response string. If empty, value from $_POST will be used

-
-

Exceptions

- - - -
\Captcha\Exception
-

Returns

- -
-
-
-

Retrieve currently set error

-
getError() : string
-
-
-
-

Returns

-
string
-
-
-
-

Retrieve currently set private key

-
getPrivateKey() : string
-
-
-
-

Returns

-
string
-
-
-
-

Retrieve currently set public key

-
getPublicKey() : string
-
-
-
-

Returns

-
string
-
-
-
-

Generates reCaptcha form to output to your end user

-
html() : string
-
-
-
-

Exceptions

- - - -
\Captcha\Exception
-

Returns

-
string
-
-
-
-

Check if SSL is currently enabled

-
isSsl() : bool
-
-
-
-

Returns

-
bool
-
-
-
-

Set public key

-
setError(string $error) : \Captcha\reCaptcha
-
-
-
-

Parameters

-
-

$error

-string -
-

Returns

-
\Captcha\reCaptcha
-
-
-
-

Set private key

-
setPrivateKey(string $key) : \Captcha\reCaptcha
-
-
-
-

Parameters

-
-

$key

-string -
-

Returns

-
\Captcha\reCaptcha
-
-
-
-

Set public key

-
setPublicKey(string $key) : \Captcha\reCaptcha
-
-
-
-

Parameters

-
-

$key

-string -
-

Returns

-
\Captcha\reCaptcha
-
-
-
-

Set SSL flag

-
setSsl(bool $flag) : void
-
-
-
-

Parameters

-
-

$flag

-bool -
-
-
-
-

Construct encoded URI string from an array

-
encode(array $parameters) : string
-
-
-
-

Parameters

-
-

$parameters

-array -
-

Returns

-
string
-
-
-
-

Make a signed validation request to reCaptcha's servers

-
process(array $parameters) : string
-
-
-
-

Parameters

-
-

$parameters

-array -
-

Exceptions

- - - -
\Captcha\Exception
-

Returns

-
string
-
-
-

- Properties

- 
-

-
$error : string
-
-
-
- 
-

-
$isSsl : bool
-
-
-
- 
-

-
$privateKey : string
-
-
-
- 
-

-
$publicKey : string
-
-
-
-

- Constants

- 
-

reCaptcha's API server

-
SERVER : string
-
-
-
- 
-

reCaptcha's secure API server

-
SERVER_SECURE : string
-
-
-
- 
-

reCaptcha's verify server

-
VERIFY_SERVER : string
-
-
-
-
-
-
-
-
-
- - diff --git a/Documentation/classes/Captcha.Exception.html b/Documentation/classes/Captcha.Exception.html deleted file mode 100644 index 309cfb1..0000000 --- a/Documentation/classes/Captcha.Exception.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - -phpDocumentor » \Captcha\Exception - - - - - - - - - - -
- -
-
-
- -
- -
-
- -
-

Copyright (c) 2012, Aleksey Korzun -All rights reserved.

-
-

Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met:

- -
    -
  1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer.
  2. -
  3. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution.
  4. -
- -

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

- -

The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project.

- -

reCaptcha exception object

- - - - - - - - - - - - - -
authorAleksey Korzun
packagelibrary
subpackagereCaptcha
-
-
-
-
-
-
- - diff --git a/Documentation/classes/Captcha.Response.html b/Documentation/classes/Captcha.Response.html deleted file mode 100644 index f50d57c..0000000 --- a/Documentation/classes/Captcha.Response.html +++ /dev/null @@ -1,208 +0,0 @@ - - - - - -phpDocumentor » \Captcha\Response - - - - - - - - - - -
- -
- -
- -
-

Copyright (c) 2012, Aleksey Korzun -All rights reserved.

-
-

Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met:

- -
    -
  1. Redistributions of source code must retain the above copyright notice, this -list of conditions and the following disclaimer.
  2. -
  3. Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution.
  4. -
- -

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

- -

The views and conclusions contained in the software and documentation are those -of the authors and should not be interpreted as representing official policies, -either expressed or implied, of the FreeBSD Project.

- -

reCaptcha response object

- - - - - - - - - - - - - -
authorAleksey Korzun
packagelibrary
subpackagereCaptcha
-

- Methods

-
-

Retrieve currently set error message

-
getError() : string
-
-
-
-

Returns

-
string
-
-
-
-

Checks if response is valid (good)

-
isValid() : bool
-
-
-
-

Returns

-
bool
-
-
-
-

Set error message that should be returned to user

-
setError(string $error) : \Captcha\Response
-
-
-
-

Parameters

-
-

$error

-string -
-

Returns

- -
-
-
-

Set flag for a valid response indicator

-
setValid(bool $flag) : \Captcha\Response
-
-
-
-

Parameters

-
-

$flag

-bool -
-

Returns

- -
-
-

- Properties

- 
-

-
$error : string
-
-
-
- 
-

-
$isValid : bool
-
-
-
-
-
-
-
-
-
- - diff --git a/Documentation/deprecated.html b/Documentation/deprecated.html deleted file mode 100644 index 76699d4..0000000 --- a/Documentation/deprecated.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -phpDocumentor - - - - - - - - - - -
- -
-
-
- -
No deprecated elements have been - found in this project. -
-
-
-
-
-
- - diff --git a/Documentation/errors.html b/Documentation/errors.html deleted file mode 100644 index 1236f91..0000000 --- a/Documentation/errors.html +++ /dev/null @@ -1,127 +0,0 @@ - - - - - -phpDocumentor - - - - - - - - - - -
- -
-
-
- -
-

-Captcha.php1 -

-
- - - - - - - - - - -
TypeLineDescription
error0No page-level DocBlock was found in file Captcha.php
-
-
-

-Exception.php1 -

-
- - - - - - - - - - -
TypeLineDescription
error0No page-level DocBlock was found in file Exception.php
-
-
-

-Response.php1 -

-
- - - - - - - - - - -
TypeLineDescription
error0No page-level DocBlock was found in file Response.php
-
-
-
-
-
- - diff --git a/Documentation/graph_class.html b/Documentation/graph_class.html deleted file mode 100644 index c290d9c..0000000 --- a/Documentation/graph_class.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - -phpDocumentor - - - - - - - - - - -
- -
-
-
- - diff --git a/Documentation/index.html b/Documentation/index.html deleted file mode 100644 index 753af23..0000000 --- a/Documentation/index.html +++ /dev/null @@ -1,88 +0,0 @@ - - - - - -phpDocumentor - - - - - - - - - - -
- -
-

phpDocumentor

-

Documentation

-
-
-
-
-
-
- -
-
-
- - diff --git a/Documentation/markers.html b/Documentation/markers.html deleted file mode 100644 index 136d551..0000000 --- a/Documentation/markers.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - -phpDocumentor - - - - - - - - - - -
- -
-
-
- -
No markers have been found in this project.
-
- The following markers were found: -
    -
    -
    -
    -
    -
    -
    - - diff --git a/Documentation/namespaces/Captcha.html b/Documentation/namespaces/Captcha.html deleted file mode 100644 index 8de00f0..0000000 --- a/Documentation/namespaces/Captcha.html +++ /dev/null @@ -1,106 +0,0 @@ - - - - - -phpDocumentor » Captcha - - - - - - - - - - -
    - -
    -
    -
    - -
    - -
    -
    - -
    -

    - Classes and interfaces

    -
    -

    Captcha -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    -
    -

    Exception -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    -
    -

    Response -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    -
    -
    -
    -
    -
    - - diff --git a/Documentation/packages/Default.html b/Documentation/packages/Default.html deleted file mode 100644 index c9631ed..0000000 --- a/Documentation/packages/Default.html +++ /dev/null @@ -1,71 +0,0 @@ - - - - - -phpDocumentor » Default - - - - - - - - - - -
    - -
    -
    -
    - -
    - -
    -
    -
    -
    -
    - - diff --git a/Documentation/packages/library.html b/Documentation/packages/library.html deleted file mode 100644 index ddf7e55..0000000 --- a/Documentation/packages/library.html +++ /dev/null @@ -1,119 +0,0 @@ - - - - - -phpDocumentor » library - - - - - - - - - - -
    - -
    -
    -
    - -
    - -
    -
    - -
    -

    - Classes and interfaces

    -
    -

    Captcha -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    - -
    -

    - Classes and interfaces

    -
    -

    Exception -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    -
    -

    Response -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    -
    -
    -
    -
    -
    -
    - - diff --git a/Documentation/packages/library.reCaptcha.html b/Documentation/packages/library.reCaptcha.html deleted file mode 100644 index 4829b5e..0000000 --- a/Documentation/packages/library.reCaptcha.html +++ /dev/null @@ -1,104 +0,0 @@ - - - - - -phpDocumentor » library\reCaptcha - - - - - - - - - - -
    - -
    -
    -
    - -
    - -
    -
    - -
    -

    - Classes and interfaces

    -
    -

    Exception -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    -
    -

    Response -

    -

    Copyright (c) 2012, Aleksey Korzun -All rights reserved.

    -
    -« More » -
    -
    -
    -
    -
    -
    - - diff --git a/Documentation/structure.xml b/Documentation/structure.xml index 3f826f5..0bdd064 100644 --- a/Documentation/structure.xml +++ b/Documentation/structure.xml @@ -1,6 +1,6 @@ - + Captcha @@ -44,7 +44,7 @@ either expressed or implied, of the FreeBSD Project.</p> SERVER SERVER - 'http://www.google.com/recaptcha/api' + '//www.google.com/recaptcha/api' reCaptcha's API server @@ -54,273 +54,220 @@ either expressed or implied, of the FreeBSD Project.</p> - SERVER_SECURE - SERVER_SECURE - 'https://www.google.com/recaptcha/api' - - reCaptcha's secure API server - - - string - - - - VERIFY_SERVER VERIFY_SERVER 'www.google.com' - + reCaptcha's verify server - + string - + $privateKey - + Private key - + string - + $publicKey - + Public key - + string - + $error - + Custom error message to return - + string - - $isSsl - false - - Flag to use SSL for our request(s) - - - bool - - - - - setSsl - setSsl - - Set SSL flag - - - bool - - - void - - - - $flag - true - - - - - isSsl - isSsl - - Check if SSL is currently enabled - - - bool - - - - + setPublicKey setPublicKey - + Set public key - + string - + \Captcha\reCaptcha - + $key - + getPublicKey getPublicKey - + Retrieve currently set public key - + string - + setPrivateKey setPrivateKey - + Set private key - + string - + \Captcha\reCaptcha - + $key - + getPrivateKey getPrivateKey - + Retrieve currently set private key - + string - + setError setError - + Set public key - + string - + \Captcha\reCaptcha - + $error - + getError getError - + Retrieve currently set error - + string - + html html - + Generates reCaptcha form to output to your end user - + \Captcha\Exception - + string - + check check - + Checks and validates user's response - + string - + string - + \Captcha\Exception - + \Captcha\Response - + $captcha_challenge false - + $captcha_response false - + process process - + Make a signed validation request to reCaptcha's servers - + \Captcha\Exception - + array - + string - + $parameters - + encode encode - + Construct encoded URI string from an array - + array - + string - + $parameters array @@ -331,7 +278,7 @@ either expressed or implied, of the FreeBSD Project.</p> No page-level DocBlock was found in file Captcha.php - + \Exception Exception @@ -375,7 +322,7 @@ either expressed or implied, of the FreeBSD Project.</p> No page-level DocBlock was found in file Exception.php - + Response diff --git a/README.md b/README.md index 6a90a89..8d4506a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -reCaptcha-PHP-5 (v1.1) +reCaptcha-PHP-5 (v1.1.0) ========================== A properly coded PHP 5 reCaptcha class that will allow you to interact with Google's From c6596fab6eee998769298ec337539924d8384f34 Mon Sep 17 00:00:00 2001 From: Aleksey Korzun Date: Sun, 16 Jun 2013 23:37:20 -0400 Subject: [PATCH 2/2] Updating documentation and adding proper version number for Readme --- Documentation/classes.svg | 55 +++ Documentation/classes/Captcha.Captcha.html | 345 ++++++++++++++++++ Documentation/classes/Captcha.Exception.html | 122 +++++++ Documentation/classes/Captcha.Response.html | 208 +++++++++++ Documentation/deprecated.html | 71 ++++ Documentation/errors.html | 127 +++++++ Documentation/graph_class.html | 68 ++++ Documentation/index.html | 88 +++++ Documentation/markers.html | 73 ++++ Documentation/namespaces/Captcha.html | 106 ++++++ Documentation/packages/Default.html | 71 ++++ Documentation/packages/library.html | 119 ++++++ Documentation/packages/library.reCaptcha.html | 104 ++++++ Documentation/structure.xml | 66 ++-- 14 files changed, 1590 insertions(+), 33 deletions(-) create mode 100644 Documentation/classes.svg create mode 100644 Documentation/classes/Captcha.Captcha.html create mode 100644 Documentation/classes/Captcha.Exception.html create mode 100644 Documentation/classes/Captcha.Response.html create mode 100644 Documentation/deprecated.html create mode 100644 Documentation/errors.html create mode 100644 Documentation/graph_class.html create mode 100644 Documentation/index.html create mode 100644 Documentation/markers.html create mode 100644 Documentation/namespaces/Captcha.html create mode 100644 Documentation/packages/Default.html create mode 100644 Documentation/packages/library.html create mode 100644 Documentation/packages/library.reCaptcha.html diff --git a/Documentation/classes.svg b/Documentation/classes.svg new file mode 100644 index 0000000..40f2b88 --- /dev/null +++ b/Documentation/classes.svg @@ -0,0 +1,55 @@ + + + + + + +G + +cluster_Captcha + + + + + + + + +Captcha + + +\\Captcha\\Captcha + + +Captcha + + + +\\Captcha\\Exception + + +Exception + + + +\\Exception + +\Exception + + +\\Captcha\\Exception->\\Exception + + + + +\\Captcha\\Response + + +Response + + + + diff --git a/Documentation/classes/Captcha.Captcha.html b/Documentation/classes/Captcha.Captcha.html new file mode 100644 index 0000000..bbd443e --- /dev/null +++ b/Documentation/classes/Captcha.Captcha.html @@ -0,0 +1,345 @@ + + + + + +phpDocumentor » \Captcha\Captcha + + + + + + + + + + +
    + +
    + +
    + +
    +

    Copyright (c) 2012, Aleksey Korzun +All rights reserved.

    +
    +

    Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met:

    + +
      +
    1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer.
    2. +
    3. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution.
    4. +
    + +

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    + +

    The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project.

    + +

    Proper library for reCaptcha service

    + + + + + + + + + + + + + +
    authorAleksey Korzun
    \Captcha\Exception
    packagelibrary
    +

    + Methods

    +
    +

    Checks and validates user's response

    +
    check(string $captcha_challenge, string $captcha_response) : \Captcha\Response
    +
    +
    +
    +

    Parameters

    +
    +

    $captcha_challenge

    +string

    Optional challenge string. If empty, value from $_POST will be used

    +
    +
    +

    $captcha_response

    +string

    Optional response string. If empty, value from $_POST will be used

    +
    +

    Exceptions

    + + + +
    \Captcha\Exception
    +

    Returns

    + +
    +
    +
    +

    Retrieve currently set error

    +
    getError() : string
    +
    +
    +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Retrieve currently set private key

    +
    getPrivateKey() : string
    +
    +
    +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Retrieve currently set public key

    +
    getPublicKey() : string
    +
    +
    +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Generates reCaptcha form to output to your end user

    +
    html() : string
    +
    +
    +
    +

    Exceptions

    + + + +
    \Captcha\Exception
    +

    Returns

    +
    string
    +
    +
    +
    +

    Set public key

    +
    setError(string $error) : \Captcha\reCaptcha
    +
    +
    +
    +

    Parameters

    +
    +

    $error

    +string +
    +

    Returns

    +
    \Captcha\reCaptcha
    +
    +
    +
    +

    Set private key

    +
    setPrivateKey(string $key) : \Captcha\reCaptcha
    +
    +
    +
    +

    Parameters

    +
    +

    $key

    +string +
    +

    Returns

    +
    \Captcha\reCaptcha
    +
    +
    +
    +

    Set public key

    +
    setPublicKey(string $key) : \Captcha\reCaptcha
    +
    +
    +
    +

    Parameters

    +
    +

    $key

    +string +
    +

    Returns

    +
    \Captcha\reCaptcha
    +
    +
    +
    +

    Construct encoded URI string from an array

    +
    encode(array $parameters) : string
    +
    +
    +
    +

    Parameters

    +
    +

    $parameters

    +array +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Make a signed validation request to reCaptcha's servers

    +
    process(array $parameters) : string
    +
    +
    +
    +

    Parameters

    +
    +

    $parameters

    +array +
    +

    Exceptions

    + + + +
    \Captcha\Exception
    +

    Returns

    +
    string
    +
    +
    +

    + Properties

    + 
    +

    +
    $error : string
    +
    +
    +
    + 
    +

    +
    $privateKey : string
    +
    +
    +
    + 
    +

    +
    $publicKey : string
    +
    +
    +
    +

    + Constants

    + 
    +

    reCaptcha's API server

    +
    SERVER : string
    +
    +
    +
    + 
    +

    reCaptcha's verify server

    +
    VERIFY_SERVER : string
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/Documentation/classes/Captcha.Exception.html b/Documentation/classes/Captcha.Exception.html new file mode 100644 index 0000000..2894f19 --- /dev/null +++ b/Documentation/classes/Captcha.Exception.html @@ -0,0 +1,122 @@ + + + + + +phpDocumentor » \Captcha\Exception + + + + + + + + + + +
    + +
    +
    +
    + +
    + +
    +
    + +
    +

    Copyright (c) 2012, Aleksey Korzun +All rights reserved.

    +
    +

    Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met:

    + +
      +
    1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer.
    2. +
    3. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution.
    4. +
    + +

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    + +

    The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project.

    + +

    reCaptcha exception object

    + + + + + + + + + + + + + +
    authorAleksey Korzun
    packagelibrary
    subpackagereCaptcha
    +
    +
    +
    +
    +
    +
    + + diff --git a/Documentation/classes/Captcha.Response.html b/Documentation/classes/Captcha.Response.html new file mode 100644 index 0000000..1a1b339 --- /dev/null +++ b/Documentation/classes/Captcha.Response.html @@ -0,0 +1,208 @@ + + + + + +phpDocumentor » \Captcha\Response + + + + + + + + + + +
    + +
    + +
    + +
    +

    Copyright (c) 2012, Aleksey Korzun +All rights reserved.

    +
    +

    Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met:

    + +
      +
    1. Redistributions of source code must retain the above copyright notice, this +list of conditions and the following disclaimer.
    2. +
    3. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution.
    4. +
    + +

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    + +

    The views and conclusions contained in the software and documentation are those +of the authors and should not be interpreted as representing official policies, +either expressed or implied, of the FreeBSD Project.

    + +

    reCaptcha response object

    + + + + + + + + + + + + + +
    authorAleksey Korzun
    packagelibrary
    subpackagereCaptcha
    +

    + Methods

    +
    +

    Retrieve currently set error message

    +
    getError() : string
    +
    +
    +
    +

    Returns

    +
    string
    +
    +
    +
    +

    Checks if response is valid (good)

    +
    isValid() : bool
    +
    +
    +
    +

    Returns

    +
    bool
    +
    +
    +
    +

    Set error message that should be returned to user

    +
    setError(string $error) : \Captcha\Response
    +
    +
    +
    +

    Parameters

    +
    +

    $error

    +string +
    +

    Returns

    + +
    +
    +
    +

    Set flag for a valid response indicator

    +
    setValid(bool $flag) : \Captcha\Response
    +
    +
    +
    +

    Parameters

    +
    +

    $flag

    +bool +
    +

    Returns

    + +
    +
    +

    + Properties

    + 
    +

    +
    $error : string
    +
    +
    +
    + 
    +

    +
    $isValid : bool
    +
    +
    +
    +
    +
    +
    +
    +
    +
    + + diff --git a/Documentation/deprecated.html b/Documentation/deprecated.html new file mode 100644 index 0000000..770d792 --- /dev/null +++ b/Documentation/deprecated.html @@ -0,0 +1,71 @@ + + + + + +phpDocumentor + + + + + + + + + + +
    + +
    +
    +
    + +
    No deprecated elements have been + found in this project. +
    +
    +
    +
    +
    +
    + + diff --git a/Documentation/errors.html b/Documentation/errors.html new file mode 100644 index 0000000..beb8008 --- /dev/null +++ b/Documentation/errors.html @@ -0,0 +1,127 @@ + + + + + +phpDocumentor + + + + + + + + + + +
    + +
    +
    +
    + +
    +

    +Captcha.php1 +

    +
    + + + + + + + + + + +
    TypeLineDescription
    error0No page-level DocBlock was found in file Captcha.php
    +
    +
    +

    +Exception.php1 +

    +
    + + + + + + + + + + +
    TypeLineDescription
    error0No page-level DocBlock was found in file Exception.php
    +
    +
    +

    +Response.php1 +

    +
    + + + + + + + + + + +
    TypeLineDescription
    error0No page-level DocBlock was found in file Response.php
    +
    +
    +
    +
    +
    + + diff --git a/Documentation/graph_class.html b/Documentation/graph_class.html new file mode 100644 index 0000000..a75c5e6 --- /dev/null +++ b/Documentation/graph_class.html @@ -0,0 +1,68 @@ + + + + + +phpDocumentor + + + + + + + + + + +
    + +
    +
    +
    + + diff --git a/Documentation/index.html b/Documentation/index.html new file mode 100644 index 0000000..3d60db0 --- /dev/null +++ b/Documentation/index.html @@ -0,0 +1,88 @@ + + + + + +phpDocumentor + + + + + + + + + + +
    + +
    +

    phpDocumentor

    +

    Documentation

    +
    +
    +
    +
    +
    +
    + +
    +
    +
    + + diff --git a/Documentation/markers.html b/Documentation/markers.html new file mode 100644 index 0000000..1844a23 --- /dev/null +++ b/Documentation/markers.html @@ -0,0 +1,73 @@ + + + + + +phpDocumentor + + + + + + + + + + +
    + +
    +
    +
    + +
    No markers have been found in this project.
    +
    + The following markers were found: +
      +
      +
      +
      +
      +
      +
      + + diff --git a/Documentation/namespaces/Captcha.html b/Documentation/namespaces/Captcha.html new file mode 100644 index 0000000..b74552d --- /dev/null +++ b/Documentation/namespaces/Captcha.html @@ -0,0 +1,106 @@ + + + + + +phpDocumentor » Captcha + + + + + + + + + + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +

      + Classes and interfaces

      +
      +

      Captcha +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      +
      +

      Exception +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      +
      +

      Response +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      +
      +
      +
      +
      +
      + + diff --git a/Documentation/packages/Default.html b/Documentation/packages/Default.html new file mode 100644 index 0000000..aa0b569 --- /dev/null +++ b/Documentation/packages/Default.html @@ -0,0 +1,71 @@ + + + + + +phpDocumentor » Default + + + + + + + + + + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      +
      + + diff --git a/Documentation/packages/library.html b/Documentation/packages/library.html new file mode 100644 index 0000000..df68d9b --- /dev/null +++ b/Documentation/packages/library.html @@ -0,0 +1,119 @@ + + + + + +phpDocumentor » library + + + + + + + + + + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +

      + Classes and interfaces

      +
      +

      Captcha +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      + +
      +

      + Classes and interfaces

      +
      +

      Exception +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      +
      +

      Response +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      +
      +
      +
      +
      +
      +
      + + diff --git a/Documentation/packages/library.reCaptcha.html b/Documentation/packages/library.reCaptcha.html new file mode 100644 index 0000000..1052571 --- /dev/null +++ b/Documentation/packages/library.reCaptcha.html @@ -0,0 +1,104 @@ + + + + + +phpDocumentor » library\reCaptcha + + + + + + + + + + +
      + +
      +
      +
      + +
      + +
      +
      + +
      +

      + Classes and interfaces

      +
      +

      Exception +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      +
      +

      Response +

      +

      Copyright (c) 2012, Aleksey Korzun +All rights reserved.

      +
      +« More » +
      +
      +
      +
      +
      +
      + + diff --git a/Documentation/structure.xml b/Documentation/structure.xml index 0bdd064..00b251d 100644 --- a/Documentation/structure.xml +++ b/Documentation/structure.xml @@ -47,7 +47,7 @@ either expressed or implied, of the FreeBSD Project.</p> '//www.google.com/recaptcha/api' reCaptcha's API server - + string @@ -59,7 +59,7 @@ either expressed or implied, of the FreeBSD Project.</p> 'www.google.com' reCaptcha's verify server - + string @@ -67,10 +67,10 @@ either expressed or implied, of the FreeBSD Project.</p> $privateKey - + Private key - + string @@ -78,10 +78,10 @@ either expressed or implied, of the FreeBSD Project.</p> $publicKey - + Public key - + string @@ -89,10 +89,10 @@ either expressed or implied, of the FreeBSD Project.</p> $error - + Custom error message to return - + string @@ -103,7 +103,7 @@ either expressed or implied, of the FreeBSD Project.</p> setPublicKey Set public key - + string @@ -113,7 +113,7 @@ either expressed or implied, of the FreeBSD Project.</p> $key - + @@ -122,7 +122,7 @@ either expressed or implied, of the FreeBSD Project.</p> getPublicKey Retrieve currently set public key - + string @@ -133,7 +133,7 @@ either expressed or implied, of the FreeBSD Project.</p> setPrivateKey Set private key - + string @@ -143,7 +143,7 @@ either expressed or implied, of the FreeBSD Project.</p> $key - + @@ -152,7 +152,7 @@ either expressed or implied, of the FreeBSD Project.</p> getPrivateKey Retrieve currently set private key - + string @@ -163,7 +163,7 @@ either expressed or implied, of the FreeBSD Project.</p> setError Set public key - + string @@ -173,7 +173,7 @@ either expressed or implied, of the FreeBSD Project.</p> $error - + @@ -182,7 +182,7 @@ either expressed or implied, of the FreeBSD Project.</p> getError Retrieve currently set error - + string @@ -193,7 +193,7 @@ either expressed or implied, of the FreeBSD Project.</p> html Generates reCaptcha form to output to your end user - + \Captcha\Exception @@ -207,7 +207,7 @@ either expressed or implied, of the FreeBSD Project.</p> check Checks and validates user's response - + string @@ -237,7 +237,7 @@ either expressed or implied, of the FreeBSD Project.</p> process Make a signed validation request to reCaptcha's servers - + \Captcha\Exception @@ -250,7 +250,7 @@ either expressed or implied, of the FreeBSD Project.</p> $parameters - + @@ -259,7 +259,7 @@ either expressed or implied, of the FreeBSD Project.</p> encode Construct encoded URI string from an array - + array @@ -269,7 +269,7 @@ either expressed or implied, of the FreeBSD Project.</p> $parameters - + array @@ -363,10 +363,10 @@ either expressed or implied, of the FreeBSD Project.</p> $isValid - + Is response valid - + bool @@ -374,10 +374,10 @@ either expressed or implied, of the FreeBSD Project.</p> $error - + Currently set error message - + string @@ -388,7 +388,7 @@ either expressed or implied, of the FreeBSD Project.</p> setValid Set flag for a valid response indicator - + bool @@ -398,7 +398,7 @@ either expressed or implied, of the FreeBSD Project.</p> $flag - + @@ -407,7 +407,7 @@ either expressed or implied, of the FreeBSD Project.</p> isValid Checks if response is valid (good) - + bool @@ -418,7 +418,7 @@ either expressed or implied, of the FreeBSD Project.</p> setError Set error message that should be returned to user - + string @@ -428,7 +428,7 @@ either expressed or implied, of the FreeBSD Project.</p> $error - + @@ -437,7 +437,7 @@ either expressed or implied, of the FreeBSD Project.</p> getError Retrieve currently set error message - + string