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 { header('Location:report.html?error=true'); exit; } } if (isset($_POST['redirect'])) { header('Location:'.$_POST['redirect'].'?reported=true'); exit; } else { header('Location:report.html?reported=true'); exit; } ?>