<?php
$seed = str_split('abcdefghijklmnopqrstuvwxyz' .'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
.'0123456789!@#$%^&*()'); // and any other characters
shuffle($seed); // probably optional since array_is randomized; this may be redundant $rand = '';
foreach (array_rand($seed, 5) as $k) $rand .= $seed[$k];
echo $rand;
PD9waHAKCiRzZWVkID0gc3RyX3NwbGl0KCdhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5eicKICAgICAgICAgICAgICAgICAgICAgLidBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZWicKICAgICAgICAgICAgICAgICAgICAgLicwMTIzNDU2Nzg5IUAjJCVeJiooKScpOyAvLyBhbmQgYW55IG90aGVyIGNoYXJhY3RlcnMKICAgIHNodWZmbGUoJHNlZWQpOyAvLyBwcm9iYWJseSBvcHRpb25hbCBzaW5jZSBhcnJheV9pcyByYW5kb21pemVkOyB0aGlzIG1heSBiZSByZWR1bmRhbnQKICAgICRyYW5kID0gJyc7CiAgICBmb3JlYWNoIChhcnJheV9yYW5kKCRzZWVkLCA1KSBhcyAkaykgJHJhbmQgLj0gJHNlZWRbJGtdOwogICAgCiAgICBlY2hvICRyYW5kOw==