Account Creater

Started on the old forum in October 2009 · view the original in the archive · old links redirect here

No replies · 789 views · started 17 years ago · 1 min read

WhiteWarrior Principal · 1,419 posts #1

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 "User:".$user; echo " \n"; echo "Password: ".$pass;

//just increments $c for the loop $c++;
}

?>

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close