| px | top | add code | search | signup | login | help |
<? php
function randomString($len) {
srand(date("s"));
$possible="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890!@#$%^&*()";
$str="";
while(strlen($str)<$len) {
$str.=substr($possible,(rand()%(strlen($possible))),1);
}
return($str);
}
?>
Comments or questions?
PX is running PHP 5.2.11
Thanks to Miranda Productions for hosting and bandwidth.
Use of any code from PX is at your own risk.