<?php

if (isset($_POST['games'])) {
    
    $id = '';
    if (isset($_POST['target'])) {
        $id = $_POST['target'];
    }
    
    $server = '';
    if (isset($_POST['server'])) {
        $server = $_POST['server'];
    }
    
    $curl_data = [
        "id" => "192657118",
        "zone" => "9016"
    ];
    
    $ch = curl_init();
    curl_setopt_array($ch, array(
        CURLOPT_URL             => "https://api-cek-id-game.vercel.app/api/game/".$_POST['games']."/?id=".$id."&zone=".$server."",
        CURLOPT_POST            => false,
        CURLOPT_RETURNTRANSFER  => true,
        CURLOPT_HEADER          => false,
        CURLOPT_IPRESOLVE		=> CURL_IPRESOLVE_V4,
    ));
    
    $result = curl_exec($ch);
    $resul1t = json_decode($data, true);
    echo $result;
}
