Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

class ApiCheckController extends Controller { public function check($user_id = null, $..

Decoded Output download

<?  class ApiCheckController extends Controller 
{ 
  public function check($user_id = null, $zone_id = null, $game = null) 
  { 
    $params = array("key" => ENV("MYS_KEY"), "sign" => md5(ENV("MYS_ID") . ENV("MYS_KEY")), "type" => "game", "code" => $game, "user_id" => $user_id, "zone_id" => $zone_id); 
    $result = $this->connect($params); 
    if ($result["status"] == true) { 
      return array("status" => array("code" => 200), "data" => array("userNameGame" => $result["data"]["username"])); 
    } else { 
      return array("status" => array("code" => 1, "message" => $result["message"])); 
    } 
  } 
  public function connect($data = null) 
  { 
    $curl = curl_init(); 
    curl_setopt_array($curl, array(CURLOPT_URL => "https://apigames.my.id/v1/check-game", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => http_build_query($data), CURLOPT_HTTPHEADER => array("Content-Type: application/x-www-form-urlencoded"))); 
    $response = curl_exec($curl); 
    curl_close($curl); 
    return json_decode($response, true); 
  } 
} ?>

Did this file decode correctly?

Original Code

class ApiCheckController extends Controller
{
  public function check($user_id = null, $zone_id = null, $game = null)
  {
    $params = array("\153\145\x79" => ENV("\115\x59\123\x5f\113\105\x59"), "\x73\151\x67\x6e" => md5(ENV("\x4d\x59\123\x5f\111\104") . ENV("\x4d\x59\123\137\x4b\x45\131")), "\164\171\x70\145" => "\147\x61\x6d\145", "\x63\157\144\x65" => $game, "\x75\x73\x65\x72\x5f\x69\144" => $user_id, "\172\x6f\156\145\137\x69\x64" => $zone_id);
    $result = $this->connect($params);
    if ($result["\x73\x74\x61\164\x75\163"] == true) {
      return array("\163\164\x61\164\x75\x73" => array("\x63\157\144\145" => 200), "\x64\141\164\141" => array("\165\163\145\162\x4e\x61\155\x65\107\x61\x6d\145" => $result["\144\x61\x74\141"]["\x75\163\145\x72\156\x61\155\145"]));
    } else {
      return array("\163\x74\x61\164\165\x73" => array("\143\157\144\x65" => 1, "\155\x65\163\163\141\147\x65" => $result["\155\x65\x73\163\141\x67\145"]));
    }
  }
  public function connect($data = null)
  {
    $curl = curl_init();
    curl_setopt_array($curl, array(CURLOPT_URL => "\x68\164\x74\160\163\x3a\x2f\57\141\160\151\147\x61\155\x65\163\56\155\171\56\x69\x64\x2f\x76\61\57\143\150\x65\x63\x6b\x2d\147\141\x6d\x65", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\120\117\123\124", CURLOPT_POSTFIELDS => http_build_query($data), CURLOPT_HTTPHEADER => array("\x43\x6f\156\164\145\156\x74\x2d\x54\x79\160\x65\x3a\x20\x61\x70\x70\154\x69\x63\x61\164\x69\157\156\x2f\170\55\167\167\x77\x2d\x66\x6f\162\155\55\x75\162\154\x65\156\143\157\144\x65\x64")));
    $response = curl_exec($curl);
    curl_close($curl);
    return json_decode($response, true);
  }
}

Function Calls

None

Variables

None

Stats

MD5 46d9aeddf1d19a1d4be03640a0e3608c
Eval Count 0
Decode Time 58 ms