PHPDevShell 3.1.3-Stable
PHP OOP RAD Development Framework
botBlock Class Reference
Inheritance diagram for botBlock:
PHPDS_dependant

Public Member Functions

 construct ()
 botBlockFields ()
 block ()
 redirectBot ($message)

Data Fields

 $timeLapse = 10
 $throttle = 10
 $chancesBeforeThrottle = 2
 $fakeName = 'default'
 $addToDOM = 'form'
 $validateKey = true

Protected Member Functions

 validatePost ()
 validateToken ()

Detailed Description

Silent blocks spam for forms.

Author:
Jason Schoeman, maheshchari.com

Member Function Documentation

block ( )

This is called in controller with final condition to validate the form against spam. I am not really feeling good today, life is too much sometimes, my wife sometimes just wont understand me...

Returns:
boolean
botBlockFields ( )

Adds fake fields to your forms for extra checking, spam bots will complete them so we can catch them.

Returns:
boolean
construct ( )

Initiate botBlock.

Reimplemented from PHPDS_dependant.

redirectBot ( message)

Logs bot confirmed post attempt and forwards it to error page.

Parameters:
stringSpam detection in error message.
Returns:
boolean
validatePost ( ) [protected]

Use inside your form brackets to send through a token validation to limit $this->post received from external pages.

Returns:
string Returns hidden input field.
validateToken ( ) [protected]

Validates the posted key against system key, it is most probable that the spam bot wont know what it is.

Returns:
boolean

Field Documentation

$addToDOM = 'form'
$chancesBeforeThrottle = 2
$fakeName = 'default'
$throttle = 10
$timeLapse = 10
$validateKey = true

Does a validation of the form by comparing secret keys inside it, bots will mosty not be able to figure this out and will require the secret key with javascript to do so.

$var boolean


The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Enumerations