Another Random Generator
1
This little function does great for passwords, usernames, files, and anything else you need a random string for.
<?php
echo randomkeys(); //random 16 chars
echo randomkeys(7); //random 7 chars
function randomkeys($length=16){
$pattern = "1234567890abcdefghijklmnopqrstuvwxyz"; //You can put any characters you want in here
for($i=0;$i<$length;$i++)
{
$key .= $pattern{rand(0,strlen($pattern))};
}
return $key;
}
?>






I've got good news, and I've got bad news:
The universe is merely a figment of my imagination.
Now are you ready for the bad news?