json-api/shared/main.php

15 lines
291 B
PHP
Raw Normal View History

2019-09-14 17:38:35 +02:00
<?php
2023-11-20 23:29:48 +01:00
$webApiVersion = '0.2.3';
2019-09-14 17:38:35 +02:00
function sendResponse($apiResponse) {
global $webApiVersion;
$response = [
'response' => $apiResponse,
'jsonApiVersion' => $webApiVersion,
];
2023-11-20 23:29:48 +01:00
header('Access-Control-Allow-Origin: *');
2019-09-14 18:49:41 +02:00
echo json_encode($response)."\n";
2019-09-14 17:38:35 +02:00
}