0% found this document useful (0 votes)
39 views2 pages

V

The document is a PHP class named 'zulhayker' that interacts with a gaming API for member management and transactions. It includes methods for creating a member, making transfers, launching games, retrieving balances, and getting agent information. Configuration details such as URL, agent code, and signature are fetched from a database upon instantiation of the class.

Uploaded by

epicakun901
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
39 views2 pages

V

The document is a PHP class named 'zulhayker' that interacts with a gaming API for member management and transactions. It includes methods for creating a member, making transfers, launching games, retrieving balances, and getting agent information. Configuration details such as URL, agent code, and signature are fetched from a database upon instantiation of the class.

Uploaded by

epicakun901
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 2

<?

php

/////////////////////////////////////////
// LICENSE GAMES BY : SOFTGAMINGS //
// SOURCE CODE BUILD BY : ZULHAYKER //
// COPYRIGHT @2024------ALL RESERVED //
/////////////////////////////////////////

include "../function/connect.php";

class zulhayker
{
private $urlRequest;
private $agentCode;
private $signature;

public function __construct($koneksi)


{
$config = $this->getConfigFromDatabase($koneksi);
$this->urlRequest = $config['url_request'];
$this->agentCode = $config['agent_code'];
$this->signature = $config['signature'];
}

private function getConfigFromDatabase($koneksi)


{
$sql = "SELECT url_request, agent_code, signature FROM config WHERE id =
1";
$result = mysqli_query($koneksi, $sql);

$config = array();
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
$config['url_request'] = $row['url_request'];
$config['agent_code'] = $row['agent_code'];
$config['signature'] = $row['signature'];
}
} else {
die("Tidak ada data konfigurasi");
}

return $config;
}

public function Create($username)


{
$action = $this->urlRequest . "CreateMember.aspx?agent_code=" . $this-
>agentCode . "&secret_key=" . $this->signature . "&username=" .
urlencode($username);
return $this->connect($action);
}

public function Transaksi($username, $amount, $type)


{
$action = $this->urlRequest . "MakeTransfer.aspx?agent_code=" . $this-
>agentCode . "&secret_key=" . $this->signature . "&username=" .
urlencode($username) . "&amount=" . $amount . "&type=" . $type;
return $this->connect($action);
}
public function OpenGame($username, $game_provider, $game_type, $game_code)
{
$action = $this->urlRequest . "LaunchGame.aspx?agent_code=" . $this-
>agentCode . "&secret_key=" . $this->signature . "&username=" .
urlencode($username). "&provider=" . $game_provider . "&game_type=" . $game_type .
"&game_code=" . $game_code;
return $this->connect($action);
}

public function GetBalance($username)


{
$action = $this->urlRequest . "GetBalance.ashx?agent_code=" . $this-
>agentCode . "&secret_key=" . $this->signature . "&username=" .
urlencode($username);
return $this->connect($action);
}

public function InfoAgent()


{
$action = $this->urlRequest . "GetBalanceAgent.ashx?agent_code=" . $this-
>agentCode . "&secret_key=" . $this->signature;
return $this->connect($action);
}

private function connect($url)


{
$ch = curl_init();
curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
curl_setopt($ch, CURLOPT_AUTOREFERER, TRUE);
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64;
x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.47 Safari/537.36');
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$output = curl_exec($ch);
curl_close($ch);
return $output;
}
}

$ZH = new zulhayker($koneksi);

You might also like