   <?php
   
   if(isset($_POST['fetching'])){
$owner = $_POST['owner'];
    $filename = 'texts/' . $owner . '.json';

    if (file_exists($filename)) {
        // File exists, read the existing JSON data
        $list = array(json_decode(file_get_contents($filename)));
        echo json_encode($list);
    } else {
        echo "no file";
    }
    
   }
 
    ?>