Dear community,
Hosted on a LAMP
server (not my OpenWrt router), I have the shellyclose.php
file to close all my shutters at once when hitting that file's url:
<?php
function call_REST_API($url){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
curl_exec($curl);
curl_close($curl);
}
call_REST_API('http://shutter1/roller/0?go=close');
call_REST_API('http://shutter2/roller/0?go=close');
?>
I want to provide a similar service with my OpenWrt router installing as few additional packages as possible due to its tight memory.
Thus my question:
How to consume a REST API method from the default OpenWrt's in-house server?
Thanks,