I have a text file storing strings. The text file will be changing every 1 minute. I want to show whole string in my php page. My php code just fetchs the data from text file. I want my php page to refresh every minute and show the updated data.
My data.txt
file is:
1~1~10,56,82,34,22,78,56,15,41,25,47,33,48~82-I am Aakash,83- I am Vijay
my php code for fetching data is:
<?php
$myFile = "data.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, filesize($myFile));
fclose($fh);
echo $theData;
?>