Note: i try to post all info of advertises from acrcloud to the my local txt file and save the data.
I am working on laravel 5.8
my AcrCloud callback Url : http://medya.guru/list
Note 2: i have a cron job command also this is;
curl -s medya.guru/list >/dev/null
it is working every minute ,
The function data() in the controller is ;
public function data(){
$filename = storage_path('tmp/monitor_result.lst');
$stream_result = array();
$stream_result['stream_id'] = $_POST['stream_id'];
$stream_result['stream_url'] = $_POST['stream_url'];
$stream_result['stream_data'] = json_decode($_POST["data"], true); #monitor result body.
$stream_result['stream_status'] = $_POST["status"]; ##status=0 means data is No Result.
//save result to mysql, redis or file
file_put_contents($filename, json_encode($stream_result)."\n", FILE_APPEND);
echo "ok";
}
Note 1: I get a post null {"stream_id":null,"stream_url":null,"stream_data":null,"stream_status":null}