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

header('Content-Type: application/json');
// Simple ping check — your server is alive if this script runs
$response = [
    'status' => 'ok',
    'timestamp' => date('Y-m-d H:i:s')
];

// Return JSON
echo json_encode($response);
