Hi all,
Looking for a little help for the exec binding using PaperUI,
I think I have set it up correctly, this is what I have:
But when I channel it to get the response i get the following results:
Can anyone tell me what I’m doing wrong?
Thanks
muellthos
(Hans-Thomas Mueller)
2
Because you get an “permission denied” error, maybe your script runs as the wrong user?
@muellthos
Hi,
This is the script I am trying to run,
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://api.uptimerobot.com/v2/getMonitors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "api_key=enterYourAPIKeyHere&format=json&logs=1",
CURLOPT_HTTPHEADER => array(
"cache-control: no-cache",
"content-type: application/x-www-form-urlencoded"
),
));
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
I have also tried the following:
curl -X POST -H “Content-Type: application/x-www-form-urlencoded” -H “Cache-Control: no-cache” -d ‘api_key=enterYourAPIKeyHere&format=json&logs=1’ “https://api.uptimerobot.com/v2/getMonitors”
With my own api inserted in both. How would I go about changing which user it is running as?
Thanks