I want to make a query with curl but I do not know which url to give it
I have tried this:
// Préparation des données
$data = [];
$data["code__client"] = "VERTDIS13";
$data["status"] = "90";
$data["numero__incident"] = "INC544842";
// On tranforme le tableau PHP en objet JSON
$data = json_encode($data);
// Envoi au serveur
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,"/notification/server");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "data=" . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$server_output = curl_exec($ch);
curl_close($ch);
// Ici pour tester j'affiche ce que le serveur renvoi
echo $server_output;
but the page only reload and nothing happens
I put
dd($server_output);
and this return false
what 's the issue ?
Thanks for you help