<?php
header("Access-Control-Allow-Origin: http://diuvin.shop");
header("Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS");
header("Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With");
date_default_timezone_set('Asia/Kolkata');
$serviceNowTimeFormatted = date('Y-m-d H:i:s');

$jsonData = '{
    "data": [
        {
            "id": 1,
            "typeNameCode": 9301,
            "categoryCode": "Lottery",
            "categoryName": "彩票",
            "state": 1,
            "sort": 10,
            "categoryImg": "https://ossimg.91admin123admin.com/91club/gamecategory/gamecategory_20240311141426883l.png"
        },
    
        {
            "id": 2,
            "typeNameCode": 9302,
            "categoryCode": "Popular",
            "categoryName": "热门游戏",
            "state": 1,
            "sort": 8,
            "categoryImg": "https://ossimg.91admin123admin.com/91club/gamecategory/gamecategory_20240311141445b3ka.png"
        },
        {
            "id": 4,
            "typeNameCode": 9304,
            "categoryCode": "Slot",
            "categoryName": "电子游戏",
            "state": 1,
            "sort": 6,
            "categoryImg": "https://ossimg.91admin123admin.com/91club/gamecategory/gamecategory_20240311141457h3ts.png"
        },
        {
            "id": 3,
            "typeNameCode": 9303,
            "categoryCode": "Fish",
            "categoryName": "捕鱼游戏",
            "state": 1,
            "sort": 5,
            "categoryImg": "https://ossimg.91admin123admin.com/91club/gamecategory/gamecategory_20240311141515owja.png"
        }
    ],
    "code": 0,
    "msg": "Succeed",
    "msgCode": 0,
    "serviceNowTime": "' . $serviceNowTimeFormatted . '"
}';

$data = json_decode($jsonData, true);

$response = json_encode($data, JSON_PRETTY_PRINT);

header('Content-Type: application/json');
echo $response;

?>