I need to pull data with PHP every 10 seconds

Rideharder1

New Member
I set up a very small (internal) dedicated web server, and I need to pull some energy data every 10 seconds or so from an XML file. This is the PHP code I have thus far:\[code\] <?php $mydata = http://stackoverflow.com/questions/11286926/simplexml_load_file('http://192.168.x.xx:yyy/data.xml'); echo $mydata->device[0]->name; echo $mydata->device[0]->value; ?>\[/code\]I tested similar code out on my web server and PHP is installed and I think this should work, but I'd like to have this run every 10 seconds or so. This way the data displaying on my web page is always up to date. The web page will be left running 24/7 as a sign on the wall. What's the easiest way to refresh the data?
 
Back
Top