inTime)) < date("h:i:s",strtotime($curr_time))) //Compares if the inTime of stored in each json is less than the one in the time variable. { unset($db_file[$i]); //Removes the json in db_file[i]. $db_change = True; //Indicates that their was change in db_file. } } if ($db_change == True) //Check if there was a change in db_file. { file_put_contents($dir, $db_file); //Rewrites the db.txt with the contents of db_file. } } date_default_timezone_set('America/Puerto_Rico'); //Changes the default timezone of the script to Puerto Rico. dbcleaner('/var/www/html/db.txt'); dbcleaner('/var/www/html/db2.txt'); ?>