Blame | Letzte Änderung | Log anzeigen | RSS feed
<code><font color="#000000"><font color="#0000BB"><?php<br /></font><font color="#FF8000">// Antispam example using a random string<br /></font><font color="#007700">require_once </font><font color="#DD0000">"../jpgraph_antispam.php"</font><font color="#007700">;<br /><br /></font><font color="#FF8000">// Create new anti-spam challenge creator<br />// Note: Neither '0' (digit) or 'O' (letter) can be used to avoid confusion<br /></font><font color="#0000BB">$spam </font><font color="#007700">= new </font><font color="#0000BB">AntiSpam</font><font color="#007700">();<br /><br /></font><font color="#FF8000">// Create a random 5 char challenge and return the string generated<br /></font><font color="#0000BB">$chars </font><font color="#007700">= </font><font color="#0000BB">$spam</font><font color="#007700">-></font><font color="#0000BB">Rand</font><font color="#007700">(</font><font color="#0000BB">5</font><font color="#007700">);<br /><br /></font><font color="#FF8000">// Stroke random cahllenge<br /></font><font color="#007700">if( </font><font color="#0000BB">$spam</font><font color="#007700">-></font><font color="#0000BB">Stroke</font><font color="#007700">() === </font><font color="#0000BB">false </font><font color="#007700">) {<br /> die(</font><font color="#DD0000">'Illegal or no data to plot'</font><font color="#007700">);<br />}<br /><br /></font><font color="#0000BB">?><br /></font><br /></font></code>