6

newpassword

new_password
SYNOPSIS

new_password($len=6)

DESCRIPTION

newpassword returns a random password of $len characters.

CODE
  1. require_once 'strrand.php';
  2.  
  3. function newpassword($len=6) {
  4.     $charset = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';
  5.  
  6.     return strrand($charset, $len);
  7. }

newpassword returns 6 random characters in capital letters or digits.

SEE ALSO

strrand, emailcrypto

Comments

To add a comment, click here.