Account Creater

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Account Creater

    Make as many accounts with one click....

    <?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, $num, 1);
    $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++;
    }




    ?>
Working...
X