In a previous article, we introduced the PHP verification code class of the call text tutorial, I believe that you have a certain understanding and understanding of the verification code, it can prevent the form of malicious registration or submission, prevent malicious password, brush tickets, brush pages, etc., through the verification code can also alleviate the server pressure, Today, we will introduce the use of PHP captcha style!
First download the PHP Verification code class We need in this section: http://www.php.cn/xiazai/leiku/458
Then save the downloaded PHP file class library to our local server, then we create a PHP file!
Finally, this class is called in this new file, and the class is instantiated:
<?phpinclude_once "yanzhengma.php"; Introduction of Class library file $obj = new Class_authcode (100,50,5); Instantiate the object and set the width, height, and length of the captcha image. $obj->authcode; Get the verification code. $obj->output (); Output captcha picture.?>
The results of the operation are as follows:
Description
Each time you run or refresh this page, the validation you get is different.