PHP Digital Verification Code, PHP digital Verification Code
It is very convenient to implement verification code in PHP, the key point is to master the use of PHP GD Library and session.
Throughout the online PHP generation Verification code example, is not all PHP GD library and session combination, and the use of PHP generated random number method to complete.
PHP Verification code, can be divided into many kinds, including PHP image verification Code, PHP random verification Code, as well as PHP Chinese verification code, according to different applications to use different verification code.
Here to share a PHP digital verification code, for everyone's reference.
1, Digital Verification Code
/* *filename:authpage.php * /Session_Start (); Srand (Double) microtime () *1000000); $authnum =$_session[' Authnum ']; Verify that the user input is consistent with the verification code if (isset ($_post[' authinput ')) { if (strcmp ($_post[' authinput '],$_session[') Authnum ']) ==0) echo "verified success! "; else echo "Validation failed! "; } Generate a new four-bit integer verification Code //while (($authnum =rand ()%10000) <1000); ? >
authimg.php
http://www.bkjia.com/PHPjc/1073808.html www.bkjia.com true http://www.bkjia.com/PHPjc/1073808.html techarticle PHP Digital Verification Code , PHP digital Verification Code in PHP to implement the verification code is still very convenient, the key point is to master the PHP GD library and the use of the session. Throughout the online PHP generation Verification code example, ...