DeveloperBreeze

PHP Generate Random Password

// Define the set of characters for the password
$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*';

// Generate a random password by shuffling the characters and selecting the first 12
$password = substr(str_shuffle($characters), 0, 12);

// Display the generated password
echo 'Random Password:', $password;

Related Posts

More content you might like

Code
javascript

Generate Random Password in JavaScript

No preview available for this content.

Jan 26, 2024
Read More
Code
javascript python +1

Generate Random Password

No preview available for this content.

Jan 26, 2024
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Be the first to share your thoughts!