Please fix this code, the error are Undefined index: when the otp_request_count.json is empty.
<?php
$file = 'otp_request_count.json';
$data = file_get_contents($file);
$requestData = json_decode($data, true);
$ip = $_SERVER['REMOTE_ADDR'];
$username = 'username'; // Replace with your actual...