السلام عليكم
هذا عباره عن كود بسيط يقوم بصنع الباسووردات
كود PHP:
function gen_password($length = 8) {
/**
* The letter l (lowercase L) and the number 1
* have been removed, as they can be mistaken
* for each other. Zero and o have also been removed
*/
$chars = "abcdefghijkmnpqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789$&@%";
$password = '';
for($i = 0; $i < $length; $i++) {
$x = rand(0, strlen($chars) -1);
$password .= $chars{$x};
}
return $password;
}
// Use the following code to utilize the password
//$password = gen_password();
//echo "Your random password is: $password";
![]()
المصدر
http://www.hagii.com/modules.php?nam...opic&p=131#131