<?php
    // Check to see if the X-Api-Key header is set
    if (!isset($_SERVER['HTTP_X_API_KEY'])) { echo json_encode(array('error' => 'Required header is not set'), JSON_PRETTY_PRINT); return; }
	
    // Make sure the apikey matchces
    if ($_SERVER['HTTP_X_API_KEY'] != '3ec7d172-b654-48be-b833-14f8cc8247e4') { echo json_encode(array('error' => 'Invalid Api Key'), JSON_PRETTY_PRINT); return; }

    // Get the file content of the .json
    $data = json_decode(file_get_contents('/mnt/data/ed-2d/data.json'), TRUE);

    echo json_encode($data, JSON_PRETTY_PRINT);
?>
