Php generates random password user-defined function code (simple and fast ). Implement the code and copy the code :? Phpheader (Content-type: texthtml; charsetutf-8); functiongetRandPass ($ length6) {$ password; add the character you want to the following string implementation code and copy it:
Header ("Content-type: text/html; charset = utf-8 ");
Function getRandPass ($ length = 6 ){
$ Password = '';
// Add the desired character to the following string. the default value is 0-9 and 26 English letters.
$ Chars = "0123456789 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ";
$ Char_len = strlen ($ chars );
For ($ I = 0; $ I <$ length; $ I ++ ){
$ Loop = mt_rand (0, ($ char_len-1 ));
// Use this string as an array, randomly retrieve a character, and concatenate it into the desired number of digits.
$ Password. = $ chars [$ loop];
}
Return $ password;
}
Echo getRandPass (12); // Generate a random 12-digit password
?>
Why :? Php header ("Content-type: text/html; charset = utf-8"); function getRandPass ($ length = 6) {$ password = ''; // add the desired character to the following string...