Hi everyone,
I would like to set up my own server (a raspberry pi) so that I can have realtime access on my measures. (I plan to write a program that warns me to close my windows when my neighbors start their high-intensity wood-powered air pollution.)
I entered the server address and the path ‘/sensor.php’, the port ‘80’, user and password are empty (since I don’t plan on verifying that for now). The relevant part of the script ‘sensor.php’ looks as follows:
<?php
$log = "test" . time();
foreach($_GET as $key => $value)
{
$log = 'GET Key = ' . $key . 'Value= ' . $value;
}
foreach($_POST as $key => $value)
{
$log = 'POST Key = ' . $key . 'Value= ' . $value;
}
$log = $log . PHP_EOL;
file_put_contents('./log_'.date("j.n.Y").'.log', $log, FILE_APPEND);
// input data into mysql database ...
?>
However, the log file contains some lines, but does not show any input, neither GET nor POST. Any idea what I am missing? I assume I’m just using the custom API configuration wrong, but I can’t find it in the documentation.
Thanks for helping!