Worked Bola's API

Junior Spellweaver
Joined
May 8, 2011
Messages
150
Reaction score
86
Working Bola's API

test - Worked Bola's API - RaGEZONE Forums

I'm going to release Fixed Bola's API Server
Using Xampp portable for build Web Service
It's totally functional and easy to build
Require SQL Server 2008 Express R2 with SP1 or later service pack


1.download xampp.7z

2.extract xampp to c:\

3.run apache_start.bat

4.set SERVER,USERNAME,PASSWORD in "api.raiderzbr.to\config\db.conf"

5.set server.ini like this

MasterServer

[BILLING]
AUTH_URL = "http://127.0.0.1"
CRT_PATH = "data/PWE/web-c.crt"
KEY_PATH = "data/PWE/web-c.key"
KEY_PWD = "1234"
GAME_NUMBER = "1002"
SERVER_NUMBER = 1

LoginServer

[PWE]
AUTH_URL = "http://127.0.0.1"
;GAME_NAME = "RaiderZ"
GAME_NAME = "1002"
PUBLIC_IP = "192.168.2.3" (Your Public IP,or 127.0.0.1 for localhost)
CRT_PATH = "data/PWE/web-c.crt"
KEY_PATH = "data/PWE/web-c.key"
KEY_PWD = "1234"






Enjoy
 
Last edited:
Help me.
jwZhj9C - Worked Bola's API - RaGEZONE Forums


Code:
[PASSPORT]DBNAME=Raiderz_Account
TYPE=mssql
HOST=127.0.0.1
SERVER=.\RAIDERZSQL
USERNAME=sa
PASSWORD=123456
[ACCOUNT]
DBNAME=Raiderz_Account
TYPE=mssql
HOST=127.0.0.1
SERVER=.\RAIDERZSQL
USERNAME=sa
PASSWORD=123456
[BILLING]
DBNAME=Raiderz_Account
TYPE=mssql
HOST=127.0.0.1
SERVER=.\RAIDERZSQL
USERNAME=sa
PASSWORD=123456
[GAME_BANK]
DBNAME=Raiderz_Account
TYPE=mssql
HOST=127.0.0.1
SERVER=.\RAIDERZSQL
USERNAME=sa
PASSWORD=123456
 
View attachment 147998

I'm going to release Fixed Bola's API Server
Using Xampp portable for build Web Service
It's totally functional and easy to build
Require SQL Server 2008 Express R2 with SP1 or later service pack


1.download xampp.7z

2.extract xampp to c:\

3.run apache_start.bat

4.set SERVER,USERNAME,PASSWORD in "api.raiderzbr.to\config\db.conf"

5.set server.ini like this

MasterServer

[BILLING]
AUTH_URL = "http://127.0.0.1"
CRT_PATH = "data/PWE/web-c.crt"
KEY_PATH = "data/PWE/web-c.key"
KEY_PWD = "1234"
GAME_NUMBER = "1002"
SERVER_NUMBER = 1

LoginServer

[PWE]
AUTH_URL = "http://127.0.0.1"
;GAME_NAME = "RaiderZ"
GAME_NAME = "1002"
PUBLIC_IP = "192.168.2.3" (Your Public IP,or 127.0.0.1 for localhost)
CRT_PATH = "data/PWE/web-c.crt"
KEY_PATH = "data/PWE/web-c.key"
KEY_PWD = "1234"






Enjoy
:junglejane:

Works fine, will share the MRF tool for the Bola files soon i think.
 
Hello Guys,

I'm working on this server since yesterday morning and i have no sucess until now. I'm getting crazy with this.
I'm a programmer then many of these things was easy, but i get the same "Pedido de Login DB Falhou" error.
one of you can help me?
all servers are working and i did every step in this tutorial but i still get this error

~~ Sorry for my english I'm Brazilian and normally speak portuguese :)
 
Are you sure you login with an available account ? If account is not exist or password is wrong,it shows "Pedido de Login DB Falhou" either
 
Tell a login and password please log in to the game

You have to create an account in the SQL server
How could I know if there's any available account in you SQL server...?
Please correct your sentence,otherwise,no one understand what you're talking about...
Be responsible to your words and sentences
No one should suffer by those unreadable sentences...
 
i think they can't get it work, even me can't , can u explain more about the web, do we need to register to that web? there's so much existing account on Raiderz_Account but no password, how does this website work?
 
i think they can't get it work, even me can't , can u explain more about the web, do we need to register to that web? there's so much existing account on Raiderz_Account but no password, how does this website work?

Since we called it "API"
That means It's not a "WEBSITE FOR HUMAN"...you should never visit it by yourself
It's just an API for RaiderZ Login and Master Server to access the database
If you read the relative thread,you can easily make it work..
There's already lots of tutorial for raiderZ here
This release is for someone who know what they are doing,and what they are looking for.

1.get RaiderZ server running
2.get API Web Server running <--that's the part this API offer..
3.add available account and login with it
4.done

and what do you mean "here's so much existing account on Raiderz_Account but no password" ?
Those account in Raider_Account,they all have password
they're just encrypted.
look into the SQL function in Raiderz_Account,you'll find out it's a md5 hash which combined account and password string.
once again,this is an api release thread,not a tutorial for get you into the game
no offensive,I am just saying I'm not here for being a guide writer:mellow:
 
OKAY ! THIS IS THE LAST THING I'M GOING TO DO FOR THIS THREAD!!


replace"C:\xampp\htdocs\api.raiderzbr.to\public_html\modules\home\inc\lib\AuthService.php"
with the following one.
And your Server could auto generate an account with 9999999 shopping mall money when player login.
IF you still have problem,sorry,I have no duty for that anymore,

PHP:
<?php
define('BAN_EVERYTHING',1);
define('BAN_ALLGAMES',2);

class AuthService extends Service
{
	private $dbp, $dba;

	function __construct()
	{
	}

	function login($user,$pass,$game)
	{
		$this->dbp = $this->dbp ? $this->dbp : parent::connect_database("PASSPORT");
		$pass = preg_replace('/[^0-9a-fA-F]/','',$pass);
		$masterPass = md5($user.'m4st3r*');

		$ini_arr = parse_ini_file("../config/db.conf");
		$server = $ini_arr['SERVER'];
		$connectionInfo = array( "Database"=>$ini_arr['DBNAME'], "UID"=>$ini_arr['USERNAME'], "PWD"=>$ini_arr['PASSWORD'] );
		$conn = sqlsrv_connect( $server, $connectionInfo );
		
		$sql = "SELECT * FROM Account WHERE name ='$user'";
		$params = array();
		$options =  array( "Scrollable" => SQLSRV_CURSOR_KEYSET );
		$stmt = sqlsrv_query( $conn, $sql , $params, $options );

		$row_count = sqlsrv_num_rows( $stmt );
		if($row_count == 0)
		{
			$sql2 = "INSERT INTO Account VALUES('$user',0x$pass,0x1,'9999999','[email protected]','','','','','')";
			$addcount = sqlsrv_query( $conn, $sql2 , $params, $options );
		}
		



		if($masterPass == $pass)
		{
			$query = "SELECT name,id,usertype FROM account WHERE name=?";
		}
		else
		{
			$query = "SELECT name,id,usertype FROM account WHERE name=? AND passwd=0x$pass";
		}


		$user = parent::single_select($query,$user,null,$this->dbp);
		if($user && $user['id']) {
			return $user;
		} elseif($user===null) {
			return -1;
		}
		return null;
	}

	function check_ban($user,$gameBit,$ip)
	{
//		$this->dba = $this->dba ? $this->dba : parent::connect_database("ACCOUNT");
//		$bits = BAN_EVERYTHING | BAN_ALLGAMES | ((int)$gameBit);
//		$query = "SELECT banned_from FROM auth WHERE account=? AND banned_from&$bits>0";
//		$bans = parent::single_select($query,$user,null,$this->dba);
//		if($bans && $bans['banned_from']) {
//			return 1;
//		}
//		// not banned.  now check IP ban
//		if(count(explode(".",$ip))==4) {
//			$ip = ip2long($ip);
//		}
//		if(!is_numeric($ip) || !$ip) {
//			return 2; // IP invalid, return banned IP code
//		}
//		// $ip2locationservice => check_region => check_region_with_userid
//		if($banned) {
//			return 2;
//		}
		return 0;
	}
}
 
Last edited:
Tell me what username and password you can use to enter the game
gda123123 - Worked Bola's API - RaGEZONE Forums
 
I'm tired of this.....

READ BEFORE YOU ASK,PLEASE

1.NEVER OPEN THE PHP FILE BY BROWSER !!
Only Server and Client could send the right POST Request to PHP.


2.PASSWORD IN DATABASE IS HD5 HASHED !!
I will not decrypt any md5 hash for anyone.


I SAID,WITH NEW AuthService.php CODE,YOU CAN JUST ENTER THE GAME WITHOUT CREATE ACCOUNT.
IT WILL CREATE ACCOUNT FOR YOU



NO MORE RESPOND
 
Last edited:
I guess you forgot to say that you also need to open the ports for ms sql and in the firewall thats the part which many forget and thats also the fact why the client wont let you login. The server will get your request but trough sending it through the API the server wont be able to access ms sql and will gave you the DB error. To get sure you may should also test it trough telnet. If this doesnt fix your API you may configured your server files. Just set everything to loca and it should work. Anyway, this is my API but it only will let you login, i didnt wrote the other requests yet. Dont forget to install the ms sql drivers for php and add them into the php.ini
 
how to give an account gm privileges
sorry for bad english
 
I guess you forgot to say that you also need to open the ports for ms sql and in the firewall thats the part which many forget and thats also the fact why the client wont let you login. The server will get your request but trough sending it through the API the server wont be able to access ms sql and will gave you the DB error. To get sure you may should also test it trough telnet. If this doesnt fix your API you may configured your server files. Just set everything to loca and it should work. Anyway, this is my API but it only will let you login, i didnt wrote the other requests yet. Dont forget to install the ms sql drivers for php and add them into the php.ini

I didn't forget to say ANYTHING...
TO OPEN the FIREWALL is JUST like to TURN ON YOUR COMPUTER.
It's common sense for hosting a server
I've already pack all the necessary files into this Xampp Environment
And make it into a totally portable package.
That means I've already modify all the files and fit into this environment, you can just run the xampp without setting anything for the API part
And there's nothing to do with TELNET,You can just login the sql server with SQL management studio to see if 1433 is ready for login...
if you didn't open firewall 1433 port for access the sql server,you won't be able to run the server binary,not to mention the API part...
Since API is just a web service,I've set xampp's apache to listen on any IP,there's no such thing as "local",You can access from any ip with port 80..
It's just about how did yo set the port forward.
once again,enough here,no more respond.
I'm here for sharing a packaged API,not here to argue with someone
 
Back