Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //From inc/admin/pwtool.php:
- echo "Strong Password: " . '<span style="color:#f00;">' . make_password(15) . "</span>";
- //From libs/functions.php:
- if (!function_exists('make_password')) :
- /**
- * @public
- * @uses make_seed()
- * Generate a strong password
- * @return string
- */
- function make_password($password_length)
- {
- srand(make_seed());
- $alfa = "!@123!@4567!@890qwer!@tyuiopa@!sdfghjkl@!zxcvbn@!mQWERTYUIO@!PASDFGH@!JKLZXCVBNM!@";
- $token = "";
- for($i = 0; $i < $password_length; $i ++) {
- $token .= $alfa[rand(0, strlen($alfa))];
- }
- return $token;
- }
- endif;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement