22 lines
424 B
PHP
22 lines
424 B
PHP
<?php
|
|
|
|
require_once 'cors.php';
|
|
|
|
$input = json_decode(file_get_contents('php://input'), true);
|
|
|
|
$data = $input['data'];
|
|
$minify_json = $input['minify_json'];
|
|
|
|
try {
|
|
eval("\$data_array = {$data};");
|
|
|
|
$json = @json_encode($data_array, JSON_UNESCAPED_UNICODE | ($minify_json ? null : JSON_PRETTY_PRINT));
|
|
|
|
echo json_encode([
|
|
'data' => $json,
|
|
]);
|
|
} catch (Throwable $exception) {
|
|
echo json_encode([
|
|
'data' => '',
|
|
]);
|
|
} |