Here’s a simple function I recently wrote to randomly generate passwords in PHP. PHP Password Generator //Generate new password $characterPool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890!@#$%^&*()-_+=:;<>?'; $newPassword = ''; while(strlen($newPassword)<8) $newPassword .= $characterPool[mt_rand(0,strlen($characterPool)-1)]; 12345 //Generate new...
PHP Passwords with Character Arrays
P
Recent Comments