__________________________________________________ ________
how to use?
change
Code:
define ("AccountFilesPath", "acc\\");
like
Code:
define ("AccountFilesPath", "C:\server\acc\\");
change at
Code:
define ("AccountFilesEnding", ".acc");
__________________________________________________ ________
u can se the page at:

__________________________________________________ ________
Code:
reg.php
Code:
<?php // Constants
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", "acc\\");
define ("AccountFilesEnding", ".acc");
?>
<html>
<body>
<h1>Registration</h1>
<?php // New Account?
If (IsSet($_GET["account"])) {
// Variables
$Account = $_GET["account"];
$AllRight = True;
// Wrong Chars?
For ($I=0; $I<StrLen(WrongChars); $I++) {
If (StrPos($Account, SubStr(WrongChars,$I,1))) {
Echo "<p>Your Name musn't contain the char \"".SubStr(WrongChars,$I,1)."\"</p>";
$AllRight = False;
}
}
// File Exists?
If (file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
Echo "<p>This Account already exists!</p>";
$AllRight = False;
}
// All Right?
If ($AllRight) {
// File-Data
$Text = "[Account]\r\n";
$Text .= "AccountID=$Account\r\n";
$Text .= "Password=\r\n";
$Text .= "LogonType=2\r\n";
$Text .= "LogonCount=0\r\n";
$Text .= "Status=0\r\n";
$Text .= "Charr=\r\n";
$Text .= "Online=0\r\n";
// Create File
File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
// Check File
if(!file_exists(AccountFilesPath.$Account.AccountFilesEnding)) {
echo "<p>Error!</p>";
}
Echo "<p>This Account is created succesfully!</p>";
}
}
?>
<form action="" type=post>
<label for="name">Account-Name:</label> <input type=text id="name" name="account" size=20 maxlength=<?php Echo MaxNameLength; ?> /><br>
<button type=submit>Register</button>
</form>
<hr />
<i><small>Echi-hp.de (<a href="http://www.echi-hp.de/" target=blank>http://www.echi-hp.de/</a>) :)</small></i>
</body>
</html>
credits goes to






