Honeypot
in package
Honeypots for hungry bots.
Table of Contents
Properties
- $honeypot_field : mixed
- A non-clashy name for the honeypot field
Methods
- check() : bool|null
- See if anything stuck to the honey
- checkOrDie() : void
- See if anything stuck to the honey. Explode if it did
- render() : string
- Drop a honeypot form field
- fieldName() : string
- Get the field name for a honeypot trap. Optionally override via config
Properties
$honeypot_field
A non-clashy name for the honeypot field
private
static mixed
$honeypot_field
= 'terms_special_set_143'
Methods
check()
See if anything stuck to the honey
public
static check(string $method) : bool|null
Parameters
- $method : string
-
Form method (POST|GET).
Tags
Return values
bool|null —Validation flag - false if honeypot was triggered
checkOrDie()
See if anything stuck to the honey. Explode if it did
public
static checkOrDie(string $method) : void
Parameters
- $method : string
-
Form method (POST|GET).
Tags
render()
Drop a honeypot form field
public
static render() : string
Return values
stringfieldName()
Get the field name for a honeypot trap. Optionally override via config
private
static fieldName() : string
Add a config called 'honeypot.php' with an index value for 'field_name' to override the default