<?php header('Access-Control-Allow-Origin: *');

$filename = 'Counter.txt'; // Replace with the path to your actual text file

if (isset($_POST['contents'])) {
  $contents = $_POST['contents'];

  // Write the modified contents back to the file
  file_put_contents($filename, $contents);
}

$set_permission = chmod($filename,0755);
?>
