| Styles Demo:: captcha.php?style=[0-3] | s1 s2 |
s3 s4 |
<?session_start(); //<-must start SESSION if not done beforeinclude 'class.captcha.php';if($_POST['sent']=='true'){$captcha= new Captcha(); if($captcha->isValid()){ echo '<font color=green>Correct code !</font>'; } else { echo '<font color=red>Invalid code :(</font>'; }}// == FORM $thisFile=$_SERVER['PHP_SELF'].'?'.$_SERVER['QUERY_STRING'];if(!strstr($_SERVER['QUERY_STRING'], 'PHPSESSID')) $thisFile.='&PHPSESSID='.session_id();echo '<form action="'.$thisFile.'#demo" method="post"> <a href="captcha_test.php" title="Reload"><img src="captcha.php?style=0&PHPSESSID='.session_id().'" alt="capcha image" border="0" /></a> <br>Code:<input type="text" name="cap_code" size="5"> <input type="hidden" name="sent" value="true"> <input type="submit" name="sub" value="Check"> </form>';?>