Page 1 of 1
How people in my server can do an account in internet ??
Posted: Fri Aug 25, 2006 12:36 am
by adistaktos
How the people who playing in my server can make an account in my site ????
Posted: Fri Aug 25, 2006 12:56 am
by kadar
I've seen servers with over 30,000 accounts. But that does not mean they have that many players.
Posted: Fri Aug 25, 2006 1:04 am
by adistaktos
what do u mean??
i only want to know that !
i didn't say that i have 3 mil players in my server

Posted: Fri Aug 25, 2006 5:50 am
by msknight
This should get you there. Assuming $con is an already active db connection, $username is the user name, $password is the password they want to use.
Personally, I restrict the characters they can use to create character names, but that's another story. You can leave out the first statement if you want. Thanks to Law for the password encryption code, by the way.
$usrname = strtolower($usrname);
$enc_password = base64_encode(pack("H*", sha1(utf8_encode($password1))));
$todaydate = (time() * 1000);
$sql = "insert into $dblog_l2jdb.accounts (login, password, lastactive, access_level, lastip) values ('$usrname', '$enc_password', '$todaydate', '0', '0')";
$result_i = mysql_query($sql,$con);
if (!$result_i)
{ echo "<h2 class=\"dropmain\">Error - Can't create user account!</h2>"; }
Posted: Fri Aug 25, 2006 3:41 pm
by ThePhoenixBird