(Defined in: jpgraph_antispam.php : 546)
Class usage and Overview
This module is used to create AntiSpam challenges that can be used to prevent automatic signup by robots on WEB-pages.
Class Methods
Generate a random spam challenge string
Argument | Default | Description |
$aLen
| | Sets the length of the generated string |
Description:
Instead of specifying the string manually that should be used as a challenge the string can be automatically generated. This is done witha call to the Rand() method.
$antispam = new AntiSpam();
$rval = $antispam->Rand();
...
Set the spam challenge string
Argument | Default | Description |
$aData
| | Spam challenge |
Description:
This is an alternative way of specifying the AntiSpam string. This can also be specified in the initial creation of the ANtiSpam object ro be automatically generated with a call to the Rand() method
See also:
$antispam = new AntiSpam();
...
$antispam->Set($mySpamVal);
Send the antispam image back to the browser
Description:
This sends the antispam image back to the browser or to an optional file named as the first and only argument.
See also:
$antispam = new AntiSpam();
$rval = $antispam->Rand();
...
$antispam->Stroke()
Create a new ANtiSpam challenge image
Argument | Default | Description |
$aData
|
''
| Data to be displayed |
Description:
This method creates a new instance of the AntiSpam challenge. When the anti-spam imga eis created it is possible to directly use a supplied data string that should be displayed.
The data can also be added afterwards with a call to Set()
See also:
$spam = new AntiSpam();