Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 16:32

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Please some help here!!!

Discussion on Please some help here!!! within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Apr 2010
Posts: 8
Received Thanks: 0
Question Please some help here!!!

I have a cool private server (5530)and i don't know how to create register page!!!Please help me.
macmac98 is offline  
Old 04/19/2012, 18:45   #2
 
turk55's Avatar
 
elite*gold: 130
Join Date: Oct 2007
Posts: 1,655
Received Thanks: 706
if its not so hard, why not learn it ?
turk55 is offline  
Old 04/20/2012, 02:25   #3
 
elite*gold: 0
Join Date: Apr 2012
Posts: 63
Received Thanks: 12
If you have a cool private server, PHP wouldn't be a pain in the *** to learn since you know such a great programming language as C#. /sarcasm
~Zero~ is offline  
Old 04/20/2012, 06:13   #4
 
elite*gold: 0
Join Date: Nov 2010
Posts: 104
Received Thanks: 95
The appserver php It's very excellent ask some friend to help you out.

I can update your client version to 5375 if you would like?
awesome100able is offline  
Thanks
1 User
Old 04/20/2012, 17:14   #5
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
Quote:
Originally Posted by awesome100able View Post
[...] It's very excellent ask some friend to help you out.[...]
Really?!?! "very excellent" ?!
Whatever...

Asked Google to see what`s thinking about your register page while having a cool server?

Angellinho is offline  
Old 04/21/2012, 05:57   #6
 
elite*gold: 0
Join Date: Nov 2010
Posts: 104
Received Thanks: 95
Quote:
Originally Posted by Angellinho View Post
Really?!?! "very excellent" ?!
Whatever...

Asked Google to see what`s thinking about your register page while having a cool server?

Ok? It does not work .... or im doing something wrong? I'm using 5095/ tryed 5165 help me if you please :O ... Will help you macmac.

Really?!?! "very excellent" ?! just giving this guy words of wisdom.
awesome100able is offline  
Thanks
1 User
Old 04/21/2012, 11:07   #7
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
Make a file called "config.php"

Paste this code inside it:

PHP Code:
<?php

define
("DBHost""localhost");
define("DBName""your database");
define("DBUser""your mysql user");
define("DBPass""your mysql password");

class 
Database
{
    protected 
$connection;
    protected 
$database;

    public function 
__construct()
    {
        echo 
$settings['DBUser'];
        
$this->connection = @mysql_connect(DBHostDBUserDBPass);
        
$this->database = @mysql_select_db(DBName);
    }
Edit the following, DBName, DBUser, DBPass.

Below such in config.php add this code. You have nothing to edit there if you`re using it for 55xx version.

PHP Code:
//don`t edit anything below
function ProcRegister($Username$Password$Password2$email)
    {
        if(
$Username != "" && $Password != "" && $Password2 != "" && $email != "")
        {
            if(
strlen($Username) > && strlen($Username) < 15)
            {
                if(
eregi("^([0-9a-z])+$"$Username))
                {
                    if(!
$this->UsernameExists($Username))
                    {
                        if(
$Password == $Password2)
                        {
                            if(
strlen($Password) > && strlen($Password) < 20)
                            {
                                
$regex "^[_+a-z0-9-]+(\.[_+a-z0-9-]+)*"."@[a-z0-9-]+(\.[a-z0-9-]{1,})*"."\.([a-z]{2,}){1}$";
                                if(
eregi($regex$email))
                                {
                                    
$this->completeRegister($Username$Password$email);
                                } else {
                                    echo 
'<div style="padding:0px;line-height:19px;"><center>Please enter your E-mail address!</div></center></font>';
                                }
                            } else {
                                echo 
'<div style="padding:0px;line-height:19px;"><center>Password should be 6-20 characters!</div></center>';
                            }
                        } else {
                            echo 
'<div style="padding:0px;line-height:19px;"><center>Confirm Password should be 6-20 characters!</div></center>';
                        }
                    } else {
                        echo 
'<div style="padding:0px;line-height:19px;"><center>This account has been taken. Please a different username!</div></center>';
                    }
                } else {
                    echo 
'<div style="padding:0px;line-height:19px;"><center>Account ID should have only letters or/and numbers!</div></center>';
                }
            } else {
                echo 
'<div style="padding:0px;line-height:19px;"><center>Account ID should be 5-15 characters!</div></center>';
            }
        } else {
            echo 
'<div style="padding:0px;line-height:19px;"><center>Type in all of the Required fields</div></center>';
        }
    }
//here you edit
    
private function completeRegister($Username$Password$email)
    {
        
$ip $_SERVER['REMOTE_ADDR'];
        
$sql "INSERT INTO `accounts table` (`Username table`, `Password table`, `Email table`) VALUES ('$Username', '$Password', '$email')";
        if(
$sql mysql_query($sql$this->connection))
        
        {
            echo 
'<center>Account was created successfully.
</center>
            '
;
        } else {
            echo 
'<div style="padding:0px;line-height:19px;"><center>Unknown Error processing your requests. We are Sorry!</div></center>';
        }
    }
    private function 
UsernameExists($Username)
    {
        
$sql "SELECT * FROM `accounts table` WHERE `Username table` = '$Username'";
        
$sql = @mysql_query($sql$this->connection);
        
$sql = @mysql_num_rows($sql);
        if(
$sql 0)
        {
            return 
true;
        } else {
            return 
false;
        }
    }
}
$db = new Database();
?> 
Then save the config.php to www or however is called your web directory.

Create a new file this one called however you want, for example (register.php or reg.php).
Place this code inside it:

HTML Code:
<?php
session_start();
@require_once("config.php");

if(!isset($_SESSION['user']))
{ $_SESSION['user'] = ""; }
if(!isset($_SESSION['email']))
{ $_SESSION['email'] = ""; }
if(isset($_POST['submit']))
{
    $_SESSION['user'] = $_POST['user'];
    $_SESSION['email'] = $_POST['email'];

    $db->ProcRegister($_POST['user'], $_POST['pass'], $_POST['pass2'], $_POST['email']);
}
echo '<br/>
<form method="post" action="">


<h1>Register Account</h2>





<label for="rusername">USERNAME</label>
<input class="ffield" type="text" value="" placeholder="username" id="rusername" name="user" value="'.$_SESSION['user'].'" /><br/>


<label for="rpassword1">PASSWORD</label>
<input class="ffield" type="password" value="" placeholder="password" name="pass" value="" /><br/>

    
<label for="rpassword2">CONFIRM PASSWORD</label></div>
<input class="ffield" type="password" value="" placeholder="repeat password" name="pass2" value="" /><br/>


<label for="remail">EMAIL</label>
<input class="ffield" type="text" placeholder="email" required name="email" value="'.$_SESSION['email'].'" /><br/>

    
    <button name="submit" id="Submit" type="submit" class="negative button">Submit</button>

    </form>

';?>
Wow, now you`re having your own register.
Angellinho is offline  
Old 04/21/2012, 16:21   #8
 
diedwarrior's Avatar
 
elite*gold: 0
Join Date: Jun 2009
Posts: 611
Received Thanks: 195
Quote:
Originally Posted by awesome100able View Post
The appserver php It's very excellent ask some friend to help you out.

I can update your client version to 5375 if you would like?
so basically he got a 5530 source(even tho he doesnt, prolly a 5509)and you're going to update it to 5375..... wow dude you keep amazing me with your posts...
diedwarrior is offline  
Old 04/21/2012, 19:04   #9
 
Angellinho's Avatar
 
elite*gold: 0
Join Date: Dec 2010
Posts: 102
Received Thanks: 25
Quote:
[...]ask some friend to help you out.[...]
That`s the option "call a friend".
Angellinho is offline  
Reply




All times are GMT +1. The time now is 16:33.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.