I have a microcontroller which reads a thermocouple and sends its values to a textfile on the Raspberry Pi.
On the Pi runs a apache server which hosts my website. The website shows the value from the textfile, but to get the actual value I have to refresh the page.
index.php
<html>
<?php $temp = file_get_contents('Temp.ESP'); ?>
<header>
<h2><?php echo $temp; ?> °C</h2>
</header>
</html>
Thanks in advance