Location: PHPKode > scripts > Addressbook > addressbook/functions.php
<?
    function generatePassword($length = 8)
    {
        $chars = 'abdefhiknrstyzABDEFGHKNQRSTYZ23456789';
        $numChars = strlen($chars);
 
        $string = '';
        for ($i = 0; $i < $length; $i++) {
            $string .= substr($chars, rand(1, $numChars) - 1, 1);
        }
        return $string;
    }
	
	//echo "Your random 10 character password is: " . generatePassword(10) . "\n";
	
?>
Return current item: Addressbook