WEL COME...Tamilnet Live...தமிழ்நெட் லைவ் ..வருக வருக ...

Select Your Language

Generate and Random Password in PHP


function RandPassword($length)
{
srand(date("s"));
$charactors = "abcdefghijklmnopqrstuvwxyz1234567890ABCDEFGHIJKLMNOPQRSTUVWXYZ";
$string = "";
while(strlen($string)<$length)
{
$string .= substr($charactors, rand()%(strlen($charactors))),1);
}
return($string);
}
echo RandPassword(7);

No comments: