Sometime at the time of registration we take just email address and send random password to that email address and activation link
the following method helps to create random password :
function createRandomString(){
$len = 8;
$base='ABCDEFGHKLMNOPQRSTWXYZabcdefghjkmnpqrstwxyz123456789';
$max=strlen($base)-1;
$activatecode='';
mt_srand((double)microtime()*1000000);
while (strlen($activatecode)<$len+1)
$activatecode.=$base{mt_rand(0,$max)};
return $activatecode;
}
Hope it will work fine...
Have a nice day ....
