Search the web
Sign In
New User? Sign Up
Linux_Rocks · Linux User's Group(LUG Baroda)
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Generate a Random Password with PHP   Message List  
Reply | Forward Message #36 of 295 |
Hey Group,
Try this script out to generate Random Password Easily
Options are:
1. You can add more charactors, numbers or lower case charactors
to '$possible_charactors' is you wish.
2.You can change the string length, for example,
echo 'Random_Password(16);' for 16 charactors.


<?
function Random_Password($length) {
srand(date("s"));
$possible_charactors = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$string = "";
while(strlen($string)<$length) {
$string .= substr($possible_charactors,(rand()%(strlen
($possible_charactors))),1);
}
return($string);
}
echo Random_Password(8);
?>






Tue Aug 9, 2005 8:00 am

vabbi_techie
Offline Offline
Send Email Send Email

Forward
Message #36 of 295 |
Expand Messages Author Sort by Date

Hey Group, Try this script out to generate Random Password Easily Options are: 1. You can add more charactors, numbers or lower case charactors to...
vabbi_techie
Offline Send Email
Aug 9, 2005
8:01 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help