$code]); $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $data); curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']); $response = curl_exec($ch); if (curl_errno($ch)) { return ['success' => false, 'error' => curl_error($ch)]; } curl_close($ch); return json_decode($response, true); } $result = testObfuscation($testCode); if ($result && $result['success']) { echo "Obfuscation Successful!\n"; echo "Stats: " . json_encode($result['stats']) . "\n"; $protectedFile = 'protected_v9_0.lua'; file_put_contents($protectedFile, $result['protected_code']); echo "Protected code saved to $protectedFile\n"; // Check if it's valid Lua (syntax check) $output = []; $return_var = 0; exec("luac -p $protectedFile 2>&1", $output, $return_var); if ($return_var === 0) { echo "Syntax Check: PASSED\n"; } else { echo "Syntax Check: FAILED\n"; echo implode("\n", $output) . "\n"; } } else { echo "Obfuscation Failed!\n"; print_r($result); }