[v8X+] LocalMS Client Source

Re: LocalMS Client Source

It checks for account using php on the webserver.
Code:
<?php
## Database Information
$database = array(
		"host" => "localhost",
		"user" => "root",
		"pass" => "",
		"dbse" => "fapsauce"
		);
		
## Connect To Database
mysql_connect($database['host'], $database['user'], $database['pass']) or die("0-Database server is offline.");
mysql_select_db($database['dbse']) or die("0-Database isn't available.");

## All the other stuff...
if (!empty($_GET['username']) && !empty($_GET['password'])) {
	$username = htmlspecialchars(mysql_real_escape_string($_GET['username']));
	$password = mysql_real_escape_string($_GET['password']);

	$AQuery = sprintf("
	SELECT COUNT('id') 
	FROM accounts 
	WHERE name = '%s' AND password = '%s'",
	$username, $password);
	$aresult = mysql_query($AQuery);
	$atotal = mysql_result($aresult, 0);
	$reply = ($atotal > 0) ? true : false;

	// return $reply;
	if ($reply) {
		echo '1';
	} else {
		echo '0-Wrong username or password.';
	}
}
?>

You can also tweak it with 'banned' messages etc.
 
Re: LocalMS Client Source

it's always say wrong username or password

---------- Post added at 02:18 PM ---------- Previous post was at 01:54 PM ----------

select channel : you have been disconnected from the long server.
please try again later.
 
Re: LocalMS Client Source

It checks for account using php on the webserver.
Code:
<?php
## Database Information
$database = array(
		"host" => "localhost",
		"user" => "root",
		"pass" => "",
		"dbse" => "fapsauce"
		);
		
## Connect To Database
mysql_connect($database['host'], $database['user'], $database['pass']) or die("0-Database server is offline.");
mysql_select_db($database['dbse']) or die("0-Database isn't available.");

## All the other stuff...
if (!empty($_GET['username']) && !empty($_GET['password'])) {
	$username = htmlspecialchars(mysql_real_escape_string($_GET['username']));
	$password = mysql_real_escape_string($_GET['password']);

	$AQuery = sprintf("
	SELECT COUNT('id') 
	FROM accounts 
	WHERE name = '%s' AND password = '%s'",
	$username, $password);
	$aresult = mysql_query($AQuery);
	$atotal = mysql_result($aresult, 0);
	$reply = ($atotal > 0) ? true : false;

	// return $reply;
	if ($reply) {
		echo '1';
	} else {
		echo '0-Wrong username or password.';
	}
}
?>

You can also tweak it with 'banned' messages etc.

I need help with this.

auphhy(at)live.com.sg

Is there a way to skip the account check or just allow it to pass?
 
Last edited:
Re: LocalMS Client Source

I need help with this.

auphhy(at)live.com.sg

Is there a way to skip the account check or just allow it to pass?

nah you have to do that, its needed to allow person to login.
 
Re: LocalMS Client Source

nah you have to do that, its needed to allow person to login.

yeah, it has to go pass the account check for anyone to be allowed to login.

how do i do the account check.
i've did it on wampserver.
it doesn't seems to start up even as a page.

i need help to set that up.
i've got the rest of the server working. just stuck at this part here.
 
Re: LocalMS Client Source

This was my custom account-check script, includes ban messages for the n00bz:

PHP:
<?php

//echo "0-Testing custom server maintenance message! HELLLLLOOOO? CAN YOU SEE THE FOX?!";  die();  
//Just unquote above this line for a custom maintenance message.  =3

## Database Information
$database = array(
        "host" => "localhost",
        "user" => "root",
        "pass" => "f0xwait1sd1zt3hrea!p45sw0rd?!",
        "dbse" => "maple"
        );
        
## Connect To Database
mysql_connect($database['host'], $database['user'], $database['pass']) or die("0-Database server is offline.");
mysql_select_db($database['dbse']) or die("0-Database isn't available.");

## All the other stuff...
if (!empty($_GET['username']) && !empty($_GET['password'])) {
    $username = htmlspecialchars(mysql_real_escape_string($_GET['username']));
    $password = mysql_real_escape_string($_GET['password']);

    $AQuery = sprintf("
    SELECT COUNT('id') 
    FROM accounts 
    WHERE name = '%s' AND password = '%s'",
    $username, $password);
    $aresult = mysql_query($AQuery);
    $atotal = mysql_result($aresult, 0);
    $reply = ($atotal > 0) ? true : false;

    // return $reply;
    if ($reply) {
    $sql = mysql_query("SELECT `banned`,`banreason` FROM `accounts` WHERE `name`='".$username."'") or die(mysql_error());
    $sqlly = mysql_fetch_row($sql);
    
    if($sqlly[0] == 1){
  echo "0-This account is banned.";
    if($sqlly[1]){
    echo " BAN REASON: {$sqlly[1]}";
    }
  } else {    
        echo '1';
        }
    } else {
        echo "0-Wrong username or password (account {$username})";
    }
}
?>
 
Re: LocalMS Client Source

This was my custom account-check script, includes ban messages for the n00bz:

PHP:
<?php

//echo "0-Testing custom server maintenance message! HELLLLLOOOO? CAN YOU SEE THE FOX?!";  die();  
//Just unquote above this line for a custom maintenance message.  =3

## Database Information
$database = array(
        "host" => "localhost",
        "user" => "root",
        "pass" => "f0xwait1sd1zt3hrea!p45sw0rd?!",
        "dbse" => "maple"
        );
        
## Connect To Database
mysql_connect($database['host'], $database['user'], $database['pass']) or die("0-Database server is offline.");
mysql_select_db($database['dbse']) or die("0-Database isn't available.");

## All the other stuff...
if (!empty($_GET['username']) && !empty($_GET['password'])) {
    $username = htmlspecialchars(mysql_real_escape_string($_GET['username']));
    $password = mysql_real_escape_string($_GET['password']);

    $AQuery = sprintf("
    SELECT COUNT('id') 
    FROM accounts 
    WHERE name = '%s' AND password = '%s'",
    $username, $password);
    $aresult = mysql_query($AQuery);
    $atotal = mysql_result($aresult, 0);
    $reply = ($atotal > 0) ? true : false;

    // return $reply;
    if ($reply) {
    $sql = mysql_query("SELECT `banned`,`banreason` FROM `accounts` WHERE `name`='".$username."'") or die(mysql_error());
    $sqlly = mysql_fetch_row($sql);
    
    if($sqlly[0] == 1){
  echo "0-This account is banned.";
    if($sqlly[1]){
    echo " BAN REASON: {$sqlly[1]}";
    }
  } else {    
        echo '1';
        }
    } else {
        echo "0-Wrong username or password (account {$username})";
    }
}
?>

Hey, the dbse would be the same as the one running maple right?
 
Back