Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
28 lines (28 sloc) 843 Bytes
#This script parses a big list of username:password credentials and adds them to the database
<p>Use the following format, separate users on a new line:<br />
if (isset($_POST['str'])) {
$mails = explode("\n",$str);
foreach($mails as $ml) {
if (!empty($ml)) {
$m = explode(":",$ml);
$email = $m[0];
$password = str_replace("\r", '', $m[1]); # replace line returns
$password = str_replace('\r', '', $password); # replace literal \r string
runQuery("INSERT INTO users (email, password) VALUES ('$email', '$password')");
echo "Done!<br />";
<form method="post" action="import.php" target="_blank">
<textarea name="str" cols="50" rows="10"></textarea>
<br />
<input type="submit">
Something went wrong with that request. Please try again.