<?php
    defined('json') or header('Location: ./');
?>
<?php
    $curl = curl_init();
        
    curl_setopt($curl, CURLOPT_URL, "https://lunchhrapi.netlify.app/lunchHr.json");
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        
    $response = curl_exec($curl);

    if($e = curl_error($curl)) {
        echo $e;
    } else {
        $decodedData = json_decode($response, true);
        //echo $decodedData[0]['foods'][0]['title'];
        //echo '<pre>'; print_r($decodedData); echo '</pre>';
    }
        
    curl_close($curl);
?>