Location: PHPKode > scripts > Random Password > randompass.php
<?php


//class creates random password md5


class PassMd5
{

private $password;



public function create($pass)

{

$str = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';
	$pass = '';
	for($i=0;$i<12;$i++) {
	$pass .= substr($str,rand(0,62),1);}

$this->password=$pass;
return $this->password;
}
}
//example of how to apply

$newpass=new PassMd5();
echo"New password  = ".$newpass->create($pass);
echo"<br>New password (md5) = ".md5($newpass->create($pass));

?>
Return current item: Random Password