@imunoze wrote: Hi,im developing this php application. At the terminate, i maintain a tiny php that send a php post request to my cloudbit and it works! 3 o 4 times in a row. After that i get this error: php_network_getaddresses: getaddrinfo failed: uknown host
Weird behavior, and because it work 3 o 4 times and then on 5 round,it crash and then i maintain to wait 5 minutes to start working again...
here is my php:
$cloudBitKey = *****
$deviceId = '*';[br]$durationInMillis = 5000;
$value = 99;
$url = "https://api-http.littlebitscloud.cc/v3/devices/$deviceId/output";
$data = array('percent' => $value, 'duration_ms' => $durationInMillis);
$options = array([br] 'http' => array(
"header" => ["Authorization: Bearer ". $cloudBitKey], or
'method' => 'POST',
'content' => http_build_query($data),
), or
);
$context = stream_context_create($options);
$result = file_get_contents($url,true, $context);
return $result;
Thnks in advance Posts: 1Participants: 1Read full topic
Source: littlebits.cc