Re: [PHP] Regular Expression Help: genreate alphanumeric, 8 chars

2003-11-28 Thread David T-G
Adam -- ...and then Adam i Agnieszka Gasiorowski FNORD said... % ... % How about, % % $password = strtolower(substr(md5(uniqid(time())), 0, 7)); Hey, that's pretty slick. Good one! Gonna have to remember that; it's an excellent trick. Thanks HAND :-D -- David T-G

[PHP] Regular Expression Help: genreate alphanumeric, 8 chars

2003-11-27 Thread Shaun
Hi, I need to generate a lowercase alphanumeric passwrord thats 8 characters long, has anyone got a function that can do this? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Regular Expression Help: genreate alphanumeric, 8 chars

2003-11-27 Thread David T-G
Shaun -- [No need to post twice...] ...and then Shaun said... % % Hi, Hi! % % I need to generate a lowercase alphanumeric passwrord thats 8 characters % long, has anyone got a function that can do this? This isn't really a regular expression question, since you'd use an expression to check

Re: [PHP] Regular Expression Help: genreate alphanumeric, 8 chars

2003-11-27 Thread Bogdan Stancescu
...as in... ? // Could've been done with ASCII sets, but this way // you can easily tweak the eligible characters. $eligible='abcdefghijklmnopqrstuvwxyz0123456789'; $pwdLen=8; $password=''; for($i=0;$i$pwdLen;$i++) { $password.=$eligible[rand(0,strlen($eligible))]; } echo(Your

Re: [PHP] Regular Expression Help: genreate alphanumeric, 8 chars

2003-11-27 Thread David T-G
Bogdan -- ...and then Bogdan Stancescu said... % % ...as in... % % ? % // Could've been done with ASCII sets, but this way % // you can easily tweak the eligible characters. % $eligible='abcdefghijklmnopqrstuvwxyz0123456789'; % $pwdLen=8; % $password=''; % for($i=0;$i$pwdLen;$i++) {

Re: [PHP] Regular Expression Help: genreate alphanumeric, 8 chars

2003-11-27 Thread Burhan Khalid
Shaun wrote: Hi, I need to generate a lowercase alphanumeric passwrord thats 8 characters long, has anyone got a function that can do this? No, but I can write a quick one for you. Can't guarantee the uniqueness of the password being generated. function passgen() { srand((float) microtime()

Re: [PHP] Regular Expression Help: genreate alphanumeric, 8 chars

2003-11-27 Thread Adam i Agnieszka Gasiorowski FNORD
David T-G wrote: Bogdan -- ...and then Bogdan Stancescu said... % % ...as in... % % ? % // Could've been done with ASCII sets, but this way % // you can easily tweak the eligible characters. % $eligible='abcdefghijklmnopqrstuvwxyz0123456789'; % $pwdLen=8; % $password='';