php post request problem /

Published at 2016-01-15 00:48:59

Home / Categories / Misc / php post request problem
@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:
$c
loudBitKey = *****
$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

Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0