Last active
December 29, 2015 13:11
-
-
Save waelio/c46e3045b9a051a88457 to your computer and use it in GitHub Desktop.
Random Password from predefined dictionary
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function generate_password($length = 64){ | |
$box_array = array( 'jhg','RTJ','ZCG','{;G','KRA','!','@','$','%','^','&','*','(',')','_','=','+' ); | |
$password=''; | |
for($x=0; $x < $length; $x++){ | |
$password .= $box_array[intval(array_rand($box_array))]; | |
} | |
return $password; | |
} | |
echo generate_password(12); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment