For whatever your purpose - this will create batches or single accounts for your website.

I use it for creating batches of accounts to be sold through an agent for my site.

Maybe you have a use for it - maybe not. If you want you can improve on it in anyway you feel fit.

Enjoy!

PHP Code:
<?php

  
function makeRandomString()

//Gemerates Random string

          
$text "";
          
$salt "abcdefghjkmnpqrstuvwxyz0123456789"
          
srand((double)microtime()*1000000);  
          
$i 0

/*$i= the length of the password - below change 8 to your desired password lenght*/
          
while ($i <= 8) { 
                
$num rand() % 33
                
$tmp substr($salt$num1); 
                
$text $text $tmp
                
$i++; 
          } 
          return 
$text

//Change 30 to the number of accounts you want generated when the script runs
$c 0
while (
$c <= 30) { 
          
$user"YOURCUSTOMPREFIX".time(); /*Append a custom prefix to each username and attach it to the .time() to keep duplicate usernames out*/

//Generate Password with the randomstring Function
$pass makeRandomString(); 
$db_password md5($pass); 
sleep(1);

    
 
//Keep a record in .txt file of all the accounts generated just as backup
$log fopen("log.txt","a");
fwrite($log,"''$user', '$pass', 'NO EMAIL ATTACHED'\n\n\n\n");
$log fclose($log);
     
  
mysql_connect("DB LOCATION""DB USER""PASSWORD") or die(mysql_error());
 
mysql_select_db('DBNAME');
mysql_query("INSERT INTO MEMBERSTABLE (username, password, email, status)
VALUES ('$user', '$pass', '1', '1')"
);

  
//Print each generated account on the page so you can print for a hard copy

   
echo  "<font color='red'>User:</font>".$user;
   echo 
"<br>\n";
   echo  
"<font color='aqua'>Password</font>:      ".$pass;
  
  
//just increments $c for the loop
  
$c++; 
}
   
   


?>

Any issues with it - pm me or email me - i'd be happy to assist