1$data[] = $_POST['data'];
2
3$inp = file_get_contents('results.json');
4$tempArray = json_decode($inp);
5array_push($tempArray, $data);
6$jsonData = json_encode($tempArray);
7file_put_contents('results.json', $jsonData);
1<?php
2
3 $filename = "test.txt";
4 $data = "hi this I am https://t.me/mrbeandev";
5 file_put_contents($filename,$data);
6
7?>