<?php
function generateRandomString($length = 10) { 
$characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; 
$randomString = ''; 
for ($i&nbsp;=&nbsp;0;&nbsp;$i < $length;&nbsp;$i++) { 
$randomString&nbsp;.=&nbsp;$characters[rand(0, strlen($characters) - 1)]; 
} 
return $randomString; 
?>
<?php
echo generateRandomString(20);
?>