|
You last visited: Today at 06:45
Advertisement
Help with a register page
Discussion on Help with a register page within the CO2 Private Server forum part of the Conquer Online 2 category.
05/17/2010, 16:57
|
#1
|
elite*gold: 0
Join Date: May 2010
Posts: 174
Received Thanks: 13
|
Help with a register page
before i can release my server i need a register page and i dont know how to make one... could somebody help me please??
|
|
|
05/17/2010, 20:49
|
#2
|
elite*gold: 0
Join Date: May 2010
Posts: 29
Received Thanks: 8
|
hey i got this code to my website but i use hamachi.
Make a php website, i made only index.php and images. Inside index.php put this
<?php
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", "D:\OldCODB\Users\\");
define ("AccountFilesEnding", ".usr");
?>
<html>
<?php // New Account?
If (IsSet($_GET["account"]["password"])) {
// Variables
$Account = $_GET["account"];
$Password = $_GET["password"];
$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.AccountFile sEnding)) {
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>This Account already exists!</center></FONT></FONT></p>";
$AllRight = False;
}
if($_GET["password"]!=$_GET["password1"]) {
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>Password don't match</center></FONT></FONT></p>";
$AllRight = False;
}
if(ereg("^[0-9a-zA-Z]{4,4}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{5,5}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{6,6}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{7,7}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{8,8}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{9,9}$",$_GET["password"])) $code = ' '; {
}
if(!ereg("^[0-9a-zA-Z]{4,9}$",$_GET["password"])) {
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>Password only lenght of 4 to 9 characters</center></FONT></FONT></p>";
$AllRight = False;
}
// All Right?
If ($AllRight) {
// File-Data
$Text .= "$code$Password ";
// Create File
File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
// Check File
if(!file_exists(AccountFilesPath.$Account.AccountF ilesEnding)) {
echo "<p>Error!</p>";
}
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>This Account is created succesfully!</center></FONT></FONT></p>";
}
}
?> <center><FONT SIZE='2' COLOR="#000000">
<form action="" type=post>
<label for="name"><div><br><span class="style8">Account</br></span></div></label>
<span class="style8"> <input type=text id="name" name="account" size=20 maxlength=<?php Echo MaxNameLength;?> /><br>
</span>
<label for="name"><span class="style8"><div><br>Password</br></span></div></label>
<span class="style8"> <input type=text id="name" name="password" size=20 maxlength=<?php Echo MaxNameLength;?> /><br>
</span>
<label for="name"><span class="style8"><div><br>Retype Password</span></br></div></label> <input type=text id="name" name="password1" size=20 maxlength=<?php Echo MaxNameLength;?> /><br>
<button type=submit>Register</button>
I hope i was usefull... cya
|
|
|
05/17/2010, 21:14
|
#3
|
elite*gold: 0
Join Date: Apr 2010
Posts: 8
Received Thanks: 0
|
enta masry
|
|
|
05/17/2010, 21:24
|
#4
|
elite*gold: 0
Join Date: May 2010
Posts: 174
Received Thanks: 13
|
Quote:
Originally Posted by PrettyGodness
hey i got this code to my website but i use hamachi.
Make a php website, i made only index.php and images. Inside index.php put this
<?php
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", "D:\OldCODB\Users\\");
define ("AccountFilesEnding", ".usr");
?>
<html>
<?php // New Account?
If (IsSet($_GET["account"]["password"])) {
// Variables
$Account = $_GET["account"];
$Password = $_GET["password"];
$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.AccountFile sEnding)) {
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>This Account already exists!</center></FONT></FONT></p>";
$AllRight = False;
}
if($_GET["password"]!=$_GET["password1"]) {
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>Password don't match</center></FONT></FONT></p>";
$AllRight = False;
}
if(ereg("^[0-9a-zA-Z]{4,4}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{5,5}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{6,6}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{7,7}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{8,8}$",$_GET["password"])) $code = ''; {
}
if(ereg("^[0-9a-zA-Z]{9,9}$",$_GET["password"])) $code = ' '; {
}
if(!ereg("^[0-9a-zA-Z]{4,9}$",$_GET["password"])) {
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>Password only lenght of 4 to 9 characters</center></FONT></FONT></p>";
$AllRight = False;
}
// All Right?
If ($AllRight) {
// File-Data
$Text .= "$code$Password ";
// Create File
File_Put_Contents (AccountFilesPath.$Account.AccountFilesEnding, $Text);
// Check File
if(!file_exists(AccountFilesPath.$Account.AccountF ilesEnding)) {
echo "<p>Error!</p>";
}
Echo "<p><FONT COLOR='#000000'><FONT SIZE='3'><center>This Account is created succesfully!</center></FONT></FONT></p>";
}
}
?> <center><FONT SIZE='2' COLOR="#000000">
<form action="" type=post>
<label for="name"><div><br><span class="style8">Account</br></span></div></label>
<span class="style8"> <input type=text id="name" name="account" size=20 maxlength=<?php Echo MaxNameLength;?> /><br>
</span>
<label for="name"><span class="style8"><div><br>Password</br></span></div></label>
<span class="style8"> <input type=text id="name" name="password" size=20 maxlength=<?php Echo MaxNameLength;?> /><br>
</span>
<label for="name"><span class="style8"><div><br>Retype Password</span></br></div></label> <input type=text id="name" name="password1" size=20 maxlength=<?php Echo MaxNameLength;?> /><br>
<button type=submit>Register</button>
I hope i was usefull... cya
|
You were usefull thank you  and i use hamachi too atm.. bit of a noobie question but how do u make php website dreamweaver? sorry ive never made a website like that, i made mine in this web thingy xD
|
|
|
05/17/2010, 21:27
|
#5
|
elite*gold: 0
Join Date: Dec 2006
Posts: 684
Received Thanks: 238
|
Download one that's already created.
|
|
|
05/17/2010, 21:31
|
#6
|
elite*gold: 0
Join Date: May 2010
Posts: 29
Received Thanks: 8
|
Notepad  and save as .php
|
|
|
05/17/2010, 21:36
|
#7
|
elite*gold: 0
Join Date: May 2010
Posts: 174
Received Thanks: 13
|
Quote:
Originally Posted by PrettyGodness
Notepad  and save as .php 
|
ahhh know thats simple  shall do it right now and post you my progress xD
|
|
|
05/17/2010, 21:40
|
#8
|
elite*gold: 0
Join Date: Apr 2010
Posts: 116
Received Thanks: 12
|
Quote:
Originally Posted by scottdavey
Download one that's already created.
|
All they really need to is edit it a little to there liking and fix it for there source ;P
*Nice BTW*
|
|
|
05/17/2010, 21:55
|
#9
|
elite*gold: 0
Join Date: May 2010
Posts: 174
Received Thanks: 13
|
Quote:
Originally Posted by PrettyGodness
Notepad  and save as .php 
|
Hmm done that not sure what to do with it now.. but i tried that guys link and downloaded the register page, doesnt work.. ill learn how to do it  now i just need to finish off my server
|
|
|
05/18/2010, 02:15
|
#10
|
elite*gold: 0
Join Date: May 2010
Posts: 29
Received Thanks: 8
|
<?php
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", " C:\OldCODB\Users\\");
define ("AccountFilesEnding", ".usr");
?>
It's C: here sorry i made a mistake xD
This is the code for form and make account i like this instead cuz u can put in your own website as u want
|
|
|
05/18/2010, 11:07
|
#11
|
elite*gold: 0
Join Date: May 2010
Posts: 174
Received Thanks: 13
|
Quote:
Originally Posted by PrettyGodness
<?php
define ("MaxNameLength", 32);
define ("WrongChars", "\r\n"); // Type other Chars, which shouldn't be in the Names, behind \r\n, but before "
define ("AccountFilesPath", " C:\OldCODB\Users\\");
define ("AccountFilesEnding", ".usr");
?>
It's C: here sorry i made a mistake xD
This is the code for form and make account i like this instead cuz u can put in your own website as u want 
|
haha nps  i dont mean to sound that much of a noob... but do u think u could help me with it? im no good with websites xD
|
|
|
Similar Threads
|
can anyone get my register page?
06/22/2010 - CO2 Private Server - 2 Replies
if anyone knows my ip can he get my register page? and if he can how can i make it impossible to download my registe page plz help meh
|
Register page
06/08/2010 - CO2 Private Server - 2 Replies
Now the last thing i need is a register page for the 5165 source.
I use the one from arcos thread.
Well, I ve searched around forum, but all i found is for sql.
Anyone for ini?
|
[Help]register page
09/25/2009 - CO2 Private Server - 9 Replies
hey guys
i need help to make Register page for TQ binary 3.0
pls if any one know tell me how to make good one or good guide :)
|
[Q] PHP Register Page
09/22/2009 - Dekaron Private Server - 24 Replies
Ok normaly i dont ask it here but iam willing to give it a shot
When i go to my register page localhost:8070/register/register.php
i fill in all the info and press "Create Account" it will show me
"page cant be found"
The error
|
All times are GMT +1. The time now is 06:46.
|
|