Good colleagues I want to insert data from a small program in PHP to the Firebase Database, through Curl, I currently have this code
$url = "https://direcciones-.firebaseio.com/hola.json";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "id:6");
$jsonResponse = curl_exec($ch);
if(curl_errno($ch))
{
echo 'Curl error: ' . curl_error($ch);
}
curl_close($ch);
But at the time of Running it, the $ jsonResponse variable gives me 0, and it enters the validation of the error
What do you think could be the problem, and even try to send the complete JSON file by creating it with the Json_encode, but I get the same problem.
Greetings.