PHP simple verification code: random distortion of letters + numbers
Source: Internet
Author: User
Now there are various types of verification codes. I personally think that the verification code is for users to see, so it is easy. What interference codes, skews, and complex backgrounds are all a kind of torture to users. The website verification codes with relatively large experience are relatively simple and there is no complicated background and no interference code... syntaxHighlighter. all (); now all kinds of verification codes, I personally think that the verification code is for users to see, so it is easy. What interference codes, skews, and complex backgrounds are all a kind of torture to users.
Website verification codes with relatively large experience are relatively simple, with no complex background, no interference code, and no background.
If something is not well written, you are welcome to criticize and give some advice.
[Php]
If (! Defined ('is _ initphp') exit ('Access Denied! ');
/*************************************** **************************************** **
* InitPHP 2.0 domestic PHP development framework extension class library-verification code
*-------------------------------------------------------------------------------
* CopyRight: CopyRight By initphp.com
* You can use the source code freely, but keep the author information during use. Respecting Others means respecting yourself.
*-------------------------------------------------------------------------------
* $ Author: liuxinming
* $ Dtime: 2012-10-09
**************************************** **************************************** ***/
Class seccodeInit {
Private $ width;
Private $ height;
Private $ type = 0; // 0 letters + digit verification code
Private $ time = 3000; // verification code Expiration time (s)
Private $ color = null; // font color of the verification code
Private $ im;
Private $ length = 4; // verification code length
Private $ warping; // random twist
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service