![]() |
Password generator
Figured I'd give away my password generator.
PHP Code:
PHP Code:
|
Wouldn't it be easier just to output random characters? That way you could choose length and mix caps. MD5 outputs 35 chars, thats longer then most people have for passwords.
|
Avoid using str_split when you don't have to.. initializing the array yourself is a lot more efficient. str_split, and other methods that take care of initiliazing, were made for the manipulation of un-controllable data and such.
And as VI already said.. Just do random letters! Use uniqid() and MD5 PHP Code:
|
Can I just say that MD5 actually outputs string of 32 characters, not 35.
|
Quote:
|
You could just use md5() on time() and then randomly pick a 10-char sequence from the resulting hash.. though, I'm not sure how easily that could result in duplicates (HIGHLY unlikely, though).
|
You can use a lot of things..
PHP Code:
|
| All times are GMT. The time now is 08:37 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0