Generate Random Passwords in PHP
Written by Cory S.N. LaViska on May 17th, 2008
A PHP function that generates random strings to use for passwords.
Here is a function I wrote to generate a random string in PHP. It is probably most useful for generating passwords. You can specify the length of the resulting string, as well as what characters are allowed. The default length is eight and the default character set is alphanumeric.

Comments
You can be the first person to comment on this article!