'; /* //register user action $xml_params = array( 'version' => '0.4', 'hall_id' => 360, 'hall_secret' => 'fgkjhdfgkjh', 'name' => 'viperviper4', 'phone' => 8723498, 'operation_id' => 11177882, 'email' => 'lapki_ddsd@mail.ru', 'ex_id' => 3343, 'response_url' => 'http://google.com' ); //get balace action //http://admin.stargamecasino.com/remote_get_balance $xml_params = array( 'version' => '0.4', 'hall_id' => 360, 'hall_secret' => 'fgkjhdfgkjh', 'user_id' => 11668, 'user_ex' => 0, 'response_url' => 'http://google.com' ); //balance operations //http://admin.stargamecasino.com/remote_operation_balance $xml_params = array( 'version' => '0.4', 'hall_id' => 360, 'hall_secret' => 'fgkjhdfgkjh', 'user_id' => 11668, 'user_ex' => 0, 'operation' => 'increase', //or decrease or decrease_all 'operation_id' => 112332, 'sum' => 100, 'response_url' => "http://google.com" ); */ $xml_params = array( 'version' => '0.4', 'hall_id' => 360, 'hall_secret' => 'fgkjhdfgkjh', 'user_id' => 11668, 'user_ex' => 0, 'response_url' => 'http://google.com' ); $xml = ""; foreach ($xml_params as $key => $value){ $xml .= "<${key}>" . htmlspecialchars($value) . "\n";} $xml .= ""; $sign = md5('fgkjhdfgkjh' . $xml . 'fgkjhdfgkjh'); $string = array('reg_xml' => base64_encode($xml), 'reg_sign' => $sign); $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_URL, 'http://admin.stargamecasino.com/remote_get_balance'); curl_setopt($ch, CURLOPT_FAILONERROR, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_TIMEOUT, 3); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $string); $result = curl_exec($ch); print_r($result); echo 'Curl error: ' . curl_error($ch); curl_close($ch); ?>