Line | |
---|
1 | <?php // content="text/plain; charset=utf-8" |
---|
2 | // Antispam example using a random string |
---|
3 | require_once "jpgraph/jpgraph_antispam.php"; |
---|
4 | |
---|
5 | // Create new anti-spam challenge creator |
---|
6 | // Note: Neither '0' (digit) or 'O' (letter) can be used to avoid confusion |
---|
7 | $spam = new AntiSpam(); |
---|
8 | |
---|
9 | // Create a random 5 char challenge and return the string generated |
---|
10 | $chars = $spam->Rand(5); |
---|
11 | |
---|
12 | // Stroke random cahllenge |
---|
13 | if( $spam->Stroke() === false ) { |
---|
14 | die('Illegal or no data to plot'); |
---|
15 | } |
---|
16 | |
---|
17 | ?> |
---|
18 | |
---|
Note: See
TracBrowser
for help on using the repository browser.