Discuz6.0 + batch register user names. 1. copy adduser. php to the root directory of discuz. -- adduser. php contains the following content --? Phprequire_once.includecommon.inc.php?registr=user_listfile(.username.txt); 1. copy adduser. php to the discuz root directory;
/-- Adduser. php content is as follows --/
Require_once './include/common. inc. php ';
// Registered name
$ User_list = file ('./username.txt ');
// Registered password
$ A = "12345678 ";
$ Pwd = md5 ($ );
// Number of registered users (under ten thousand and one recommended)
$ Member_num = count ($ user_list );
// Set the running time
Set_time_limit (3600 );
For ($ I = 0; $ I <$ member_num; $ I ++ ){
$ Username = $ user_list [$ I];
$ Db-> query ("replace into {$ tablepre} members (username, password, regdate) VALUES ('$ username',' $ pwd', '123 ')");
$ Uid = $ db-> insert_id ();
$ Db-> query ("insert into {$ tablepre} memberfields (uid) VALUES ('$ uid ')");
Echo $ I. ':'. $ username. "_ complete
";
?>
2. manually collect the user name, which is also stored in the root directory of discuz
/--Username.txt content is as follows --/
Mouse365
Cainiao
SHAM
Make sure you have one row!
PS: User name collection can use the following method (to http://www.freediscuz.net/bbs/member.php? Action = list)
1. open Web http://www.freediscuz.net/bbs/member.php? Action = list;
2.copy and save the information to username.txt
Admin 1 2003-6-7 127 421
Theoldmemory 3 2003-6-8 2004-8-8 0
Lauraych 4 2003-6-9 2007-9-28 16:36 0 0
3. use the UltraEdit editor and other editors to execute regular matching to remove useless information.
Admin
Theoldmemory
Lauraych
Examples/-- adduser. php content is as follows --/? Php require_once './include/common. inc. php'; // the registered name $ user_list = file ('./username.txt ');...