<?php
header('Content-Type: application/json');
header('Access-Control-Allow-Origin: *');

// This API determines the current version of the app and if an update is required.

$response = [
    'success' => true,
    'version' => '1.0.0', // The latest version available
    'build_number' => 1,   // The latest build number
    'update_url' => '', // Replace with actual download link
    'force_update' => true, // If true, user cannot skip the update
    'message' => 'A new version of the app is available. Please update to continue.'
];

echo json_encode($response);
?>