wizzi Posted April 13, 2008 Posted April 13, 2008 Taken from Hopzone's forum in order to make your life easier. Enjoy well its actually from my guide on ragezone.. but i see ppl posted it everywhere by now... anyway i also made an example of acc creation... so ill add it to make it complete.. First create acc.php file in same directory as index.. and add this script to it <?php define('mySQL_hostname', '127.0.0.1'); //database IP define('mySQL_database', 'Database'); //database name define('mySQL_username', 'User'); //database user define('mySQL_password', 'Pass'); //database password function l2j_encrypt($password) { return base64_encode(pack("H*", sha1(utf8_encode($password)))); } $str = l2j_encrypt($_POST['pass']); $user = $_POST["name"]; $db_link = mysql_pconnect( mySQL_hostname, mySQL_username, mySQL_password ) or die( 'Error connecting to mysql<br><br>'.mysql_error() ); $db_select = mysql_select_db( mySQL_database, $db_link ) or die( 'Error connecting to Database<br><br>'.mysql_error() ); if ($user == '') { print'Incorrect UserID'; mysql_close(); } else { $db_add = mysql_query( "INSERT INTO `accounts` VALUES ('$user', '$str', '0', '0', '')" ) or die( 'Error: '.mysql_error() ); } print 'Account Created<br><br>Enjoy youre gameplay.'; mysql_close(); ?> after that add this to index <form action="acc.php" method=post> UserID:<input type="text" name="name" size="20"><br><br> Password:<input type="password" name="pass" size="20"><br><br> <input type=submit name="submit" value="Login"> </form> i think same encryption is used since c4.. so it should work for everyone.
rafael Posted April 23, 2008 Posted April 23, 2008 If u have Ucoz site is so easy if u have other site system that's really difficult
gandalf0007 Posted August 4, 2008 Posted August 4, 2008 Forgive for my so stupid question, this is or code html?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now