Discuz6.0 + batch register username _ PHP Tutorial

Source: Internet
Author: User
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 ');...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.