echo random_bytes($length);
$str=random_bytes(7); echo bin2hex($str);
aa108e98b1121f
Post your comments , suggestion , error , requirements etc here