<?php

function random_password( $length ) {
    
    $alphabets = array(
        'BCDEFGHIJKLMNOPQRSTUVWXYZ',
        'abcdefghijklmnopqrstuvwxyz',
        '0123456789',
        '!@#$%&*-_+,.'
    );
    
    $password = '';
    for ($i = 0; $i < $length; $i++) {
        $alphabet = $alphabets[$i % count($alphabets)];
        $alphaLength = strlen($alphabet) - 1;
        $password .= $alphabet[random_int(0, $alphaLength)];
    }
    
    return str_shuffle($password);
}

echo random_password(10);

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: