bash
docker buildx build -f Dockerfile -t php_debug:1.0 .
docker-compose
docker-compose up -d
php code for debug
function APIDebug($data) {
$curl = curl_init("http://192.168.29.11:3006/php_debug/log");
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($curl, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 1);
curl_setopt($curl, CURLOPT_TIMEOUT, 10);
$resposta = curl_exec($curl);
if (curl_errno($curl)) {
$erro = curl_error($curl);
}
curl_close($curl);
}