<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: POST, GET, OPTIONS');
header('Access-Control-Allow-Headers: Content-Type');

// Enable error reporting
error_reporting(E_ALL);
ini_set('display_errors', 1);

echo json_encode([
    'status' => 'ok',
    'message' => 'API is working',
    'time' => date('Y-m-d H:i:s'),
    'path' => __FILE__,
    'directory' => dirname(__FILE__)
]);
?>