<?php

    header('Content-Type: application/json');
        $mobile = '8076600515';
        $otp='needs immediate help. Last known location:';
        $queueFile = 'otp_queue.json';
        //log_message('error', 'Resolved OTP Queue Path: ' . $queueFile);

        $queueData = [];

        if (file_exists($queueFile)) {
            $queueData = json_decode(file_get_contents($queueFile), true) ?? [];
        }

        $queueData[$mobile] = [
            'mobile' => $mobile,
            'otp' => $otp,
            'timestamp' => time()
        ];

        file_put_contents($queueFile, json_encode($queueData, JSON_PRETTY_PRINT));
        
        echo "Kuchh nahi ". $otp;
?>