PHP Random Password Function Introduction example
-
time: 2015-12-16-20:42:48 source: network
guide: PHP generates random password function instances, PHP generates random password functions, generate numbers, uppercase and lowercase letters and special characters combination of random passwords.
PHP generates random password functions that generate random passwords for numbers, uppercase and lowercase letters, and special character Combinations.
Copy CodeThe code is as follows: function Generatepassword ($length =8)
{
$chars = Array_merge (range (0,9),
Range (' a ', ' z '),
Range (' A ', ' Z '),
Array ('! ', ' @ ', ' $ ', '% ', ' ^ ', ' & ', ' * '));
Shuffle ($chars);
$password = ";
For ($i =0; $i <8; $i + +) {
$password. = $chars [$i];
}
Return $password;
} Related articles
- Php method for generating Six-digit random passwords
- PHP generates a random user name and password method, custom password character set
- A simple way to generate random passwords in PHP
- PHP generates a custom function for random user names and passwords
- PHP generates random password functions, php password generator
- PHP generates random passwords (php custom FUNCTIONS)
- Two ways to generate strong passwords in PHP
- Example of a function that generates random passwords in PHP
- PHP random string function, generate user random password
- PHP small function for generating random passwords
Example code for PHP random cipher functions