A simple math problem captcha for low traffic sites. Often Google ReCAPTCHA has issues and lets spammers through (and they want to sell you Google ReCAPTCHA hacking service to deliver your message to millions of sites for not much money). This is not a sophisticated captcha involving a hard to solve image, but a simple addition to Google ReCAPTCHA for automated bots that are not wise to two captchas on a page.
Works the same way as ReCAPTCHA, just a different contructor. You really only need to pass the Page.
- Extends
- Implements
Countable PHPFUI \Interfaces \Captcha PHPFUI \Interfaces \Walkable Stringable - Traits
Constants |
public PHPFUI |
Methods |
public PHPFUI\HTML5Element::__clone() |
public __construct(PHPFUI |
public PHPFUI\Base::__toString() : string |
public PHPFUI\MultiColumn::add(?mixed $object) : static Add an element to the container |
public PHPFUI\Base::addAsFirst(?mixed $item) : static Base addAsFirst function. Adds to the front of the current
|
public PHPFUI\HTML5Element::addAttribute(string $attribute, string $value = '') : static Add an attribute the the object
|
public PHPFUI\HTML5Element::addClass(string $class) : static Add a class to an object
|
public PHPFUI\HTML5Element::addPHPClassName() : static Adds the base PHP class name as a class to this object |
public PHPFUI\MultiColumn::count() : int Return the number of columns so far |
public PHPFUI\HTML5Element::deleteAttribute(string $attribute) : static Deletes the passed attribute |
public PHPFUI\HTML5Element::deleteAttributes() : static Deletes all attributes |
public PHPFUI\HTML5Element::deleteClass(string $classToDelete) : static Delete a class from the object |
public PHPFUI\HTML5Element::disabled() : static Disabled the element |
public PHPFUI\Base::done(bool $done = true) : static Form is done rendering |
public PHPFUI\HTML5Element::getAttribute(string $attribute) : ?string Get an attribute
|
public PHPFUI\HTML5Element::getAttributes() : string Returns the attribute strings. Attributes with values are returned as name/value pairs, |
public PHPFUI\HTML5Element::getClass() : string Returns the class attribute ready for insertion into an element. |
public PHPFUI\HTML5Element::getClasses() : array Returns all classes for the object
|
public static PHPFUI\Base::getDebug(int $flags = 0) : int Gets the current debug setting |
public PHPFUI\HTML5Element::getElement() : string Return the type of the element |
public PHPFUI\HTML5Element::getId() : string Return the id of the object. Elements will not have an id unless this method is called. The id is returned as a string |
public PHPFUI\HTML5Element::getIdAttribute() : string Return the id attribute of the object as a name/value pair. If no id has been requested, and empty string is returned. |
public PHPFUI\Base::getResponse() : string Get the current response |
public PHPFUI\HTML5Element::getToolTip(string $label) : PHPFUI Get the tool tip as a string
|
public PHPFUI\HTML5Element::hasClass(string $class) : bool Return true if the class is present on the object |
public PHPFUI\HTML5Element::hasId() : bool Does this object have an id set already? |
public PHPFUI\HTML5Element::hasToolTip() : bool
|
public PHPFUI\Base::isDone() : bool Returns true if the page needs no more processing |
public isValid() : bool |
public PHPFUI\HTML5Element::newId() : static Assign a new id to this element. |
public PHPFUI\Base::prepend(?mixed $item) : static Add an object in front of existing object |
public PHPFUI\HTML5Element::setAttribute(string $attribute, string $value = '') : static Set the attribute overwriting the prior value
|
public PHPFUI\HTML5Element::setConfirm( $text) : static A simple way to set a confirm on click
|
public static PHPFUI\Base::setDebug(int $level = 0) : void Set the debug level, 1 or higher is on |
public PHPFUI\HTML5Element::setElement( $element) : static You can set the element type if you need to morph it for some reason
|
public PHPFUI\HTML5Element::setId( $id) : static Set the base id of the object
|
public PHPFUI\GridX::setMargin() : static |
public PHPFUI\Base::setRawResponse(string $response, bool $asJSON = true) : static Sets the page response directly and exits the program
|
public PHPFUI\Base::setResponse(string $response, string $color = 'lime') : static Set a response in the standard format ('reponse' and 'color' array)
|
public PHPFUI\HTML5Element::setToolTip(PHPFUI Set the tool tip. Can either be a ToolTip or a string. If it is a string, it will be converted to a ToolTip |
public PHPFUI\HTML5Element::toggleAnimate(PHPFUI Will toggle the provided element on click with the provided animation. |
public PHPFUI\HTML5Element::toggleClass(PHPFUI Will toggle the class on the provided element on click. |
public PHPFUI\HTML5Element::transferAttributes(PHPFUI Moves attributes into this object from the passed object |
public PHPFUI\HTML5Element::transferClasses(PHPFUI Moves classes into this object from the passed object |
public PHPFUI\Base::walk(string $method, ?mixed $argument = NULL) : static Recursively walks all objects and calls the passed method on each object where it exists
|
Methods |
protected PHPFUI\HTML5Element::getBody() : string |
protected PHPFUI\HTML5Element::getEnd() : string |
protected PHPFUI\Base::getItems() : array
|
protected PHPFUI\MultiColumn::getStart() : string |
protected PHPFUI\HTML5Element::upCastCopy(PHPFUI Clones the first object and fills it with properties from the second object |
Properties |
private string $fieldName = 'mathAnswer' |
private array $operators = ['plus' => '+', 'minus' => '-', 'times' => '*']
|
Methods |
public static PHPFUI\Base::getDebug(int $flags = 0) : int Gets the current debug setting |
public static PHPFUI\Base::setDebug(int $level = 0) : void Set the debug level, 1 or higher is on |