Jump to content

Recommended Posts

  • 1 month later...
Posted

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.

  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...
  • 2 weeks later...
  • 1 month later...
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.




×
×
  • Create New...