token, 'Content-type:application/json' )); curl_setopt($ch, CURLOPT_URL,"http://200.144.254.107/wekan/api/boards/v82Wx3C3dk79t4pJw/lists/dHNhYSSyyqWhRn6NX/cards"); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, '{ "title": "'.$summary.'", "description": "'.$details.'", "authorId": "'. $dadosLogin->id.'", "swimlaneId": "HeJBje3EdmJ3GpZyb" }'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $retorno = curl_exec($ch); curl_close ($ch); $resposta = json_decode($retorno); if (!$resposta->_id) { throw new Exception(); } } catch (Exception $ex) { if (isset($_POST['redirect'])) { header('Location:'.$_POST['redirect'].'?error=true'); exit; } else { // send error status instead // header('Location:report.html?error=true'); http_response_code(500); exit; } } if (isset($_POST['redirect'])) { header('Location:'.$_POST['redirect'].'?reported=true'); exit; } else { // send ok status instead // header('Location:report.html?reported=true'); http_response_code(200); exit; } ?>