<?php
function generateSignatureGame($operatorcode, $providercode, $secret_key) {
    $raw_string = $operatorcode . $providercode . $secret_key;
    return strtoupper(md5($raw_string));
}
$signatureGame = generateSignatureGame($operatorcode, $providercode, $secret_key);

$operatorcode = "xf4i";
$secret_key = "9d8d2f40de61881b6a02d518cfb1e5fb";
$providercode = "AG";

$url = "http://gsmd.336699bet.com/getGameList.ashx?operatorcode=$operatorcode&providercode=$providercode&lang=id-ID&html=0&reformatjson=yes&signature=$signatureGame";

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$response = curl_exec($ch);
curl_close($ch);

header('Content-Type: application/json');
echo $response;
