I have a sensor that can send HTTP GET requests containing data. I want to receive this data and send it to a webpage. I want the webpage to update when we get new data. We get new data about every 2 minutes. I want the data to be as up-to-date as possible.
Currently I'm querying the sensor for data, but that is putting too much load on the sensor as every user who has a webpage open is constantly making requests to the sensor. This is the reason I'd like to switch to having the sensor send the data out on set intervals. I've been reading about SSE and web-hooks etc. but need some direction on tying this all together.
Just in your procces http://localhost?id=1
$_GET['id'];
And in youur view
<?php echo "$_GET['id']";?>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.