Home > Backend Development > PHP Tutorial > Discuz 60+ batch registration usernames

Discuz 60+ batch registration usernames

WBOY
Release: 2016-07-29 08:40:49
Original
1188 people have browsed it

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($a);
//Number of registered users (10,000 recommended) Next)
$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','1175655041')");
$uid = $ db->insert_id();
$db->query("INSERT INTO {$tablepre}memberfields (uid) VALUES ('$uid')");
echo $i.':'.$username." __Complete
";
?>
2. Manually collect the username and put it in the discuz root directory
/--username.txt content is as follows--/
mouse365
Big rookie
SHAM
Just make sure there’s one per line!
PS: The following methods can be used to collect user names (take http://www.freediscuz.net/bbs/member.php?action=list as an example)
1. Open the URL http://www.freediscuz.net /bbs/member.php?action=list;
2. Copy the following information and save it to username.txt
admin 1 2003-6-7 2008-12-22 15:06 127 421
theoldmemory 3 2003-6-8 2004- 8-8 23:15 0 0
lauraych 4 2003-6-9 2007-9-28 16:36 0 0
3. Use editors such as UltraEdit to perform regular matching to remove useless information
admin
theoldmemory
lauraych

The above introduces Discuz 60+ batch registration of user names, including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template