Aleix Cortadellas
A little bit of everything…
-
Two methods for generating random strings and passwords
Many websites and boards, upon registration, send the new users an e-mail with their user name and a random password. This is just one of the many purposes for which generating a random string or password is useful.Ever wondered how this is done? Actually, with PHP, it’s very easy. I will explain you two ways of doing so, and provide the necessary code for you to have the script up and running immediately; you may use the one which suits your needs most. Of course, those are not the only ways to achieve the same goal, but are very effective and in the same time, easy to understand. Note that in this post, the random string will be used as password.


