note 10400 added to rand
| From: | l33th4x0r at yahoo dot com | Date: | Tue, 02 Jan 2001 01:09:29 +0000 |
| Subject: | note 10400 added to rand | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9245@lists.php.net to get a copy of this message | ||
Umm.. that's a bad way of generating strings. You could use substr() on a string consisting of
[A-Z0-9] with rand() as the index and 1 length for a much better way. Your way will generate all
kinds of trash characters.
http://www.php.net/manual/function.rand.php